diff --git a/.gitignore b/.gitignore index e6e6c8329..8dd97c299 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,13 @@ docker/data/* docker/persist/* vendor/* attachments/* +code/tests/_output/* +code/var/* +code/vendor/* +code/src/AppBundle/tests/_output/* +code/src/AppBundle/tests/_support/_generated/* +.idea/* +supervisord.log +supervisord.pid +code/web/attachments/* +code/web/js/ckeditor/* \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index 5d9e8e54b..627bb36bd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,7 +3,10 @@ services: - docker env: - COMPOSE_VERSION: 1.7.1 + global: + - COMPOSE_VERSION: 1.12.0 + - secure: W83x4IKY3XSPsxhIP6fqTZvggqPvBeZXfbC+DWQRlerir0e/7pLwaICgPrXH6fOLAmdHtOCgore0NIq8gMHO0ktyuYsqBiunIWunlDlEsHNtnZwKdDz6g8XId85/FFqv54aVHHxW310gvFfw6B2Lpu4CsWuWuWLpr/TMp+kRVktVPes57MRl6gVWm2VwJt961GmAt3snFSNK5adrYi+JElpQq1Ow1+JuB/evd1zPCfEhYY/xXDuViMo2yDmNwUtDM/MX4QT+a4mc5EIlOFsMNZLJgwLmcKa8M9wjNDwi9hePNB0Mas77aeHxvUTbGPayF0rFDdyD+g0ZMFS16OcfvtAik65CswV1TC/9jQ9LDciaIsPqpH+0ur9EWRc2NybfYVVhRocdtZ5VxWql9BzNDv991IAqIuvVNuJO6LDQ6UCI+zz/I9m7BC4Ean94Jz2HP/tqI8wftXK35bjrgMWgEOXuF8MYnfAnFeP+1Hp2aFYKs0qTfsrZDz5rCQTGksd0tmdRz1UrrGjuHQhauHvZX+Tiz0nbgRaCjFRJicIXkI/ZH/srGZsBvSJy3rsp00PsdksZ2HkZPr9hwpah5tWxA3yEsES0p+6DWUay94SvJL4XJYKcfrlav+TTlo9SgiK47pLx1V59WBB1WIY+1irVV5wh3gWQPNgHuultah/n6h0= + - secure: KEcrIpXfepTir1baq96qF/44sBhyE6l6YNKCvGVQNamMwPgodwFD28eNbOnI2PAUqH6U8dUekUhTCMs0fUyGTSNUtFVGtDGwbvoKCgMnG8UlpcmyaVgo7xyN4UKsBdKOWQAT44VDbBY4/9/16KQoJ4t8Jod5VOt6LENhjF804YmjtCS7MW46VhuK1mD1L0voe2lPWPtc1tlBgOTQ62zgZulLmD0JilWw5PckI9zu8ZeNpNqOjAs2mYRgU6Ed5LPWSyjkBVWH11EtQsvXQKwQUynDFH3wnoeDpP3Nigi4pWOqAWr7r+A/F5pBlklANLpT49nBEMtUu9SPuqGKkdBlaCIVbd/ov3PowRg4BfDBN/o8ZAGaUcS3lBtXMYJun4e0Zq9irmtFt6rI/HYxPscInPlsafZ3ROf577F0qGtec8aRcpGzi+QAEGpTCM9uYm4PEX88ajQbRCTdD+p7FLsQCahqrFkZD2xPSR4Pt3sRCKHX5AW6/XYMcKomz4xw1bs2okWOmZWzFbGo26cMeAzpEuxwRp8o/WB7Xn9ulhUWxpBy1KBEgPBRUcK9EihTo89nabcwFDJuZTbxmRyz8HokAaW1TOZ+qIb9vtzKMP81fUr/YN59Ty926U1rdOBW21rKIDuT+jo700CRCthgQ2vTIZs5DtMW6+JautKL3wwLQuk= before_install: - sudo apt-get update -qq @@ -17,11 +20,23 @@ php: - 5.6 script: + - echo $COMPOSE_VERSION + - uname -s + - uname -m - composer install - - ./vendor/bin/phpunit src/OpenCATS/Tests/UnitTests - - cd docker/; docker-compose -f docker-compose-test.yml up -d - - docker-compose -f docker-compose-test.yml exec php /var/www/public/test/runAllTests.sh - - cd ..; ./ci/package-code.sh + - docker ps + - cd code; composer install; cd .. + - cd code; ./vendor/bin/codecept build; cd .. + - cd docker/; docker-compose -f docker-compose-unittest.yml up -d; cd .. + - docker exec -ti docker_unittestphp_1 /var/www/test/runUnitTests.sh + - cd docker/; docker-compose -f docker-compose-unittest.yml down; cd .. + - export TAG=`if [ "$TRAVIS_TAG" != "" ]; then echo $TRAVIS_TAG; elif [ "$TRAVIS_BRANCH" == "master" ]; then echo "latest"; else echo $TRAVIS_BRANCH; fi` + - docker build -t opencats/opencats:$TAG . + - cd docker/env-test; docker-compose up -d + - docker --version + - docker info + - docker-compose exec opencats /var/www/test/runAllTests.sh + - cd ..; cd ..; ./ci/package-code.sh deploy: provider: releases @@ -34,3 +49,17 @@ deploy: on: tags: true +addons: + artifacts: + debug: true + paths: + - ./code/tests/_output + target_paths: $TRAVIS_REPO_SLUG/$TRAVIS_BUILD_NUMBER + working_dir: WORKING_DIR + bucket: opencats + s3_region: us-east-1 + +after_success: + - export TAG=`if [ "$TRAVIS_TAG" != "" ]; then echo $TRAVIS_TAG; elif [ "$TRAVIS_BRANCH" == "master" ]; then echo "latest"; else echo $TRAVIS_BRANCH; fi` + - docker login --username $DOCKER_USER --password $DOCKER_PASS + - docker push opencats/opencats:$TAG diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 000000000..e74ca5d1d --- /dev/null +++ b/Dockerfile @@ -0,0 +1,2 @@ +FROM opencats/base:0.1.0 +ADD . /var/www 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 deleted file mode 100644 index fcf9ad9d4..000000000 --- a/ajax.php +++ /dev/null @@ -1,136 +0,0 @@ -', "\n"; - echo( - "\n" . - " -1\n" . - " No function specified.\n" . - "\n" - ); - - die(); -} - -if (strpos($_REQUEST['f'], ':') === false) -{ - $function = preg_replace("/[^A-Za-z0-9]/", "", $_REQUEST['f']); - - $filename = sprintf('ajax/%s.php', $function); -} -else -{ - /* Split function parameter into module name and function name. */ - $parameters = explode(':', $_REQUEST['f']); - - $module = preg_replace("/[^A-Za-z0-9]/", "", $parameters[0]); - $function = preg_replace("/[^A-Za-z0-9]/", "", $parameters[1]); - - $filename = sprintf('modules/%s/ajax/%s.php', $module, $function); -} - -if (!is_readable($filename)) -{ - header('Content-type: text/xml'); - echo '', "\n"; - echo( - "\n" . - " -1\n" . - " Invalid function name.\n" . - "\n" - ); - - die(); -} - -$filters = array(); - -if (!isset($_REQUEST['nobuffer'])) -{ - include_once('./lib/Hooks.php'); - - ob_start(); - include($filename); - $output = ob_get_clean(); - - if (!eval(Hooks::get('AJAX_HOOK'))) return; - - if (!isset($_REQUEST['nospacefilter'])) - { - $output = preg_replace('/^\s+/m', '', $output); - } - - foreach ($filters as $filter) - { - eval($filter); - } - - echo($output); -} -else -{ - 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/getCandidateIdByEmail.php b/ajax/getCandidateIdByEmail.php index a10f24496..90b44b6b2 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/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..2060240dc 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(); @@ -56,36 +56,35 @@ if (empty($companiesArray)) { $interface->outputXMLErrorPage(-2, 'No companies data.'); - die(); -} - -$output = - "\n" . - " 0\n" . - " \n" . - " " . count($companiesArray) . "\n"; - -$arrayCounter = 0; -foreach ($companiesArray as $rowIndex => $row) +} else { - $arrayCounter++; - - if ($arrayCounter > $maxResults) + $output = + "\n" . + " 0\n" . + " \n" . + " " . count($companiesArray) . "\n"; + + $arrayCounter = 0; + foreach ($companiesArray as $rowIndex => $row) { - break; + $arrayCounter++; + + if ($arrayCounter > $maxResults) + { + break; + } + + $output .= + " \n" . + " " . $companiesArray[$rowIndex]['companyID'] . "\n" . + " " . rawurlencode($companiesArray[$rowIndex]['name']) . "\n" . + " \n"; } $output .= - " \n" . - " " . $companiesArray[$rowIndex]['companyID'] . "\n" . - " " . rawurlencode($companiesArray[$rowIndex]['name']) . "\n" . - " \n"; -} - -$output .= - "\n"; - -/* Send back the XML data. */ -$interface->outputXMLPage($output); + "\n"; + /* Send back the XML data. */ + $interface->outputXMLPage($output); +} ?> 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/replaceTemplateTags.php b/ajax/replaceTemplateTags.php new file mode 100644 index 000000000..eebcf379f --- /dev/null +++ b/ajax/replaceTemplateTags.php @@ -0,0 +1,56 @@ +isRequiredIDValid('candidateID', false)) + { + $interface->outputXMLErrorPage(-1, 'Invalid candidate ID.'); + die(); + } + + $siteID = $interface->getSiteID(); + + $candidateID = $_REQUEST['candidateID']; + $templateText = $_REQUEST['templateText']; + + /* Get an array of the company's location data. */ + $candidates = new Candidates($siteID); + $candidateData = $candidates->get($candidateID); + $emailTemplates = new EmailTemplates($siteID); + $emailTemplateText = $emailTemplates->replaceVariables($templateText); + + if (empty($candidateData)) + { + $interface->outputXMLErrorPage(-2, 'No candidate data.'); + die(); + } + + $stringsToFind = array( + '%CANDOWNER%', + '%CANDFIRSTNAME%', + '%CANDFULLNAME%' + ); + $replacementStrings = array( + $candidateData['ownerFullName'], + $candidateData['firstName'], + $candidateData['candidateFullName'], + ); + $emailTemplateText = str_replace( + $stringsToFind, + $replacementStrings, + $emailTemplateText + ); + + /* Send back the XML data. */ + $interface->outputXMLPage( + "\n" . + " 0\n" . + " \n" . + " " . htmlspecialchars($emailTemplateText) . "\n" . + "\n" + ); + +?> \ No newline at end of file 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/showTemplate.php b/ajax/showTemplate.php new file mode 100644 index 000000000..4a39c4e92 --- /dev/null +++ b/ajax/showTemplate.php @@ -0,0 +1,36 @@ +isRequiredIDValid('templateID', false)) + { + $interface->outputXMLErrorPage(-1, 'Invalid template ID.'); + die(); + } + + $siteID = $interface->getSiteID(); + + $templateID = $_REQUEST['templateID']; + + /* Get an array of the company's location data. */ + $emailTemplates = new EmailTemplates($siteID); + $emailTemplateText = $emailTemplates->get($templateID)['text']; + + if (empty($emailTemplateText)) + { + $interface->outputXMLErrorPage(-2, 'No template data.'); + die(); + } + + /* Send back the XML data. */ + $interface->outputXMLPage( + "\n" . + " 0\n" . + " \n" . + " " . htmlspecialchars($emailTemplateText) . "\n" . + "\n" + ); + +?> \ No newline at end of file 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/ci/package-code.sh b/ci/package-code.sh index 1bf7a511a..c5cf9b0e6 100755 --- a/ci/package-code.sh +++ b/ci/package-code.sh @@ -1,9 +1,9 @@ #!/bin/bash set -ev -if [ "${TRAVIS_TAG}" != "false" ]; then - tar -czf /tmp/opencats-$TRAVIS_TAG-full.tar.gz --exclude=INSTALL_BLOCK -C $TRAVIS_BUILD_DIR . - zip -q -x INSTALL_BLOCK -r /tmp/opencats-$TRAVIS_TAG-full.zip $TRAVIS_BUILD_DIR +if [ "${TRAVIS_TAG}" != "" ]; then + tar -czf /tmp/opencats-$TRAVIS_TAG-full.tar.gz --exclude=INSTALL_BLOCK --exclude=docker/data --exclude=docker/persist --exclude=attachments --exclude=code/tests/_output --exclude=code/var/cache --exclude=code/var/logs --exclude=code/var/sessions --exclude=code/src/AppBundle/tests/_output --exclude=code/src/AppBundle/tests/_support/_generated -C $TRAVIS_BUILD_DIR . + zip -sf -v -q -x INSTALL_BLOCK -x docker/data -x docker/persist -x attachments -x code/tests/_output -x code/var/cache -x code/var/logs -x code/var/sessions -x code/src/AppBundle/tests/_output -x code/src/AppBundle/tests/_support/_generated -r /tmp/opencats-$TRAVIS_TAG-full.zip $TRAVIS_BUILD_DIR cp /tmp/opencats-$TRAVIS_TAG-full.tar.gz $TRAVIS_BUILD_DIR cp /tmp/opencats-$TRAVIS_TAG-full.zip $TRAVIS_BUILD_DIR fi diff --git a/ckeditor/.htaccess b/ckeditor/.htaccess deleted file mode 100644 index ed1d794fe..000000000 --- a/ckeditor/.htaccess +++ /dev/null @@ -1,24 +0,0 @@ -# -# Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved. -# For licensing, see LICENSE.html or http://ckeditor.com/license -# - -# -# On some specific Linux installations you could face problems with Firefox. -# It could give you errors when loading the editor saying that some illegal -# characters were found (three strange chars in the beginning of the file). -# This could happen if you map the .js or .css files to PHP, for example. -# -# Those characters are the Byte Order Mask (BOM) of the Unicode encoded files. -# All FCKeditor files are Unicode encoded. -# - -AddType application/x-javascript .js -AddType text/css .css - -# -# If PHP is mapped to handle XML files, you could have some issues. The -# following will disable it. -# - -AddType text/xml .xml diff --git a/ckeditor/CHANGES.html b/ckeditor/CHANGES.html deleted file mode 100644 index 9b763b035..000000000 --- a/ckeditor/CHANGES.html +++ /dev/null @@ -1,538 +0,0 @@ - - - - - Changelog - CKEditor - - - - -

- CKEditor Changelog -

-

- CKEditor 3.2

-

- New features:

- -

- Fixed issues:

- -

- CKEditor 3.1.1

-

- New features:

- -

- Fixed issues:

- -

- CKEditor 3.1

-

- New features:

- -

- Fixed issues:

- -

- CKEditor 3.0.2

-

- New features:

- -

- Fixed issues:

- -

- CKEditor 3.0.1

-

- New features:

- -

- Fixed issues:

- -

- CKEditor 3.0

-

- New features:

- -

- Fixed issues:

- -

- CKEditor 3.0 RC

-

- Changelog starts at this release.

- - - diff --git a/ckeditor/CHANGES.md b/ckeditor/CHANGES.md deleted file mode 100644 index 6a6e62f3a..000000000 --- a/ckeditor/CHANGES.md +++ /dev/null @@ -1,1118 +0,0 @@ -CKEditor 4 Changelog -==================== - -## CKEditor 4.5.11 - -**Security Updates:** - -* [Severity: minor] Fixed the target="_blank" vulnerability reported by James Gaskell. - - Issue summary: If a victim had access to a spoofed version of ckeditor.com via HTTP (e.g. due to DNS spoofing, using a hacked public network or mailicious hotspot), then when using a link to the ckeditor.com website it was possible for the attacker to change the current URL of the opening page, even if the opening page was protected with SSL. - - An upgrade is recommended. - -New Features: - -* [#14747](http://dev.ckeditor.com/ticket/14747): The [Enhanced Image](http://ckeditor.com/addon/image2) caption now supports the link `target` attribute. -* [#7154](http://dev.ckeditor.com/ticket/7154): Added support for the "Display Text" field to the [Link](http://ckeditor.com/addon/link) dialog. Thanks to [Ryan Guill](https://github.com/ryanguill)! - -Fixed Issues: - -* [#13362](http://dev.ckeditor.com/ticket/13362): [Blink, WebKit] Fixed: Active widget element is not cached when it is losing focus and it is inside an editable element. -* [#13755](http://dev.ckeditor.com/ticket/13755): [Edge] Fixed: Pasting images does not work. -* [#13548](http://dev.ckeditor.com/ticket/13548): [IE] Fixed: Clicking the [elements path](http://ckeditor.com/addon/elementspath) disables Cut and Copy icons. -* [#13812](http://dev.ckeditor.com/ticket/13812): Fixed: When aborting file upload the placeholder for image is left. -* [#14659](http://dev.ckeditor.com/ticket/14659): [Blink] Fixed: Content scrolled to the top after closing the dialog in a [`
`-based editor](http://ckeditor.com/addon/divarea). -* [#14825](http://dev.ckeditor.com/ticket/14825): [Edge] Fixed: Focusing the editor causes unwanted scrolling due to dropped support for the `setActive` method. - -## CKEditor 4.5.10 - -Fixed Issues: - -* [#10750](http://dev.ckeditor.com/ticket/10750): Fixed: The editor does not escape the `font-style` family property correctly, removing quotes and whitespace from font names. -* [#14413](http://dev.ckeditor.com/ticket/14413): Fixed: The [Auto Grow](http://ckeditor.com/addon/autogrow) plugin with the [`config.autoGrow_onStartup`](http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-autoGrow_onStartup) option set to `true` does not work properly for an editor that is not visible. -* [#14451](http://dev.ckeditor.com/ticket/14451): Fixed: Numeric element ID not escaped properly. Thanks to [Jakub Chalupa](https://github.com/chaluja7)! -* [#14590](http://dev.ckeditor.com/ticket/14590): Fixed: Additional line break appearing after inline elements when switching modes. Thanks to [dpidcock](https://github.com/dpidcock)! -* [#14539](https://dev.ckeditor.com/ticket/14539): Fixed: JAWS reads "selected Blank" instead of "selected " when selecting a widget. -* [#14701](http://dev.ckeditor.com/ticket/14701): Fixed: More precise labels for [Enhanced Image](http://ckeditor.com/addon/image2) and [Placeholder](http://ckeditor.com/addon/placeholder) widgets. -* [#14667](http://dev.ckeditor.com/ticket/14667): [IE] Fixed: Removing background color from selected text removes background color from the whole paragraph. -* [#14252](http://dev.ckeditor.com/ticket/14252): [IE] Fixed: Styles drop-down list does not always reflect the current style of the text line. -* [#14275](http://dev.ckeditor.com/ticket/14275): [IE9+] Fixed: `onerror` and `onload` events are not used in browsers it could have been used when loading scripts dynamically. - -## CKEditor 4.5.9 - -Fixed Issues: - -* [#10685](http://dev.ckeditor.com/ticket/10685): Fixed: Unreadable toolbar icons after updating to the new editor version. Fixed with [6876179](https://github.com/ckeditor/ckeditor-dev/commit/6876179db4ee97e786b07b8fd72e6b4120732185) in [ckeditor-dev](https://github.com/ckeditor/ckeditor-dev) and [6c9189f4](https://github.com/ckeditor/ckeditor-presets/commit/6c9189f46392d2c126854fe8889b820b8c76d291) in [ckeditor-presets](https://github.com/ckeditor/ckeditor-presets). -* [#14573](https://dev.ckeditor.com/ticket/14573): Fixed: Missing [Widget](http://ckeditor.com/addon/widget) drag handler CSS when there are multiple editor instances. -* [#14620](https://dev.ckeditor.com/ticket/14620): Fixed: Setting both the `min-height` style for the `` element and the `height` style for the `` element breaks the [Auto Grow](http://ckeditor.com/addon/autogrow) plugin. -* [#14538](http://dev.ckeditor.com/ticket/14538): Fixed: Keyboard focus goes into an embedded `', "\n"; + echo '', "\n"; /* Definition for the cell which appears to be showing when dragging a column into a new position (not resizing). */ echo ('' . "\n"); diff --git a/lib/DatabaseConnection.php b/lib/DatabaseConnection.php index a7d611655..62494bb9d 100755 --- a/lib/DatabaseConnection.php +++ b/lib/DatabaseConnection.php @@ -75,10 +75,12 @@ public static function getInstance() } - /* Prevent this class from being instantiated by any means other + /* TODO: + * Prevent this class from being instantiated by any means other * than getInstance(). + * Had to change it to public to allow unit testing */ - private function __construct() {} + function __construct() {} private function __clone() {} public function setInTransaction($tf) diff --git a/lib/DefaultQuestionnaires.php b/lib/DefaultQuestionnaires.php index e7a5af77d..c98dd66ea 100755 --- a/lib/DefaultQuestionnaires.php +++ b/lib/DefaultQuestionnaires.php @@ -27,7 +27,7 @@ * $Id: DefaultQuestionnaires.php 3713 2007-11-27 18:52:42Z andrew $ */ -include_once('./lib/Questionnaire.php'); +include_once(LEGACY_ROOT . '/lib/Questionnaire.php'); class DefaultQuestionnaireUtility { private $_defaultQuestionnaires; diff --git a/lib/Display.php b/lib/Display.php index 70b8551fc..6cea272db 100755 --- a/lib/Display.php +++ b/lib/Display.php @@ -30,7 +30,7 @@ * @version $Id: Display.php 3831 2007-12-11 23:14:32Z brian $ */ -include_once('./lib/Profile.php'); +include_once(LEGACY_ROOT . '/lib/Profile.php'); // Global variable defining profile stylesheet (to prevent double inclusion) $profileStylesheet = false; diff --git a/lib/DocumentToText.php b/lib/DocumentToText.php index 05df242ab..f09a0f69d 100755 --- a/lib/DocumentToText.php +++ b/lib/DocumentToText.php @@ -30,8 +30,8 @@ * @version $Id: DocumentToText.php 3587 2007-11-13 03:55:57Z will $ */ -include_once('./lib/SystemUtility.php'); -include_once('./lib/FileUtility.php'); +include_once(LEGACY_ROOT . '/lib/SystemUtility.php'); +include_once(LEGACY_ROOT . '/lib/FileUtility.php'); /** * Document to Text Conversion Library diff --git a/lib/EmailTemplates.php b/lib/EmailTemplates.php index 217c51fda..338fe4458 100755 --- a/lib/EmailTemplates.php +++ b/lib/EmailTemplates.php @@ -30,8 +30,8 @@ * @version $Id: EmailTemplates.php 3694 2007-11-26 21:11:00Z brian $ */ -include_once('./lib/Mailer.php'); -include_once('./lib/Site.php'); +include_once(LEGACY_ROOT . '/lib/Mailer.php'); +include_once(LEGACY_ROOT . '/lib/Site.php'); /** * E-Mail Templates Library @@ -43,13 +43,69 @@ class EmailTemplates private $_db; private $_siteID; - public function __construct($siteID) { $this->_siteID = $siteID; $this->_db = DatabaseConnection::getInstance(); } + + public function delete($templateID) + { + $sql = sprintf( + "DELETE FROM + email_template + WHERE + site_id = %s + AND + email_template_id = %s + AND + tag = %s", + $this->_db->makeQueryInteger($this->_siteID), + $this->_db->makeQueryInteger($templateID), + $this->_db->makeQueryString("CUSTOM") + ); + + $this->_db->query($sql); + } + + public function add($text, $title, $tag, $siteID, $possibleVariables) + { + $sql = sprintf( + "INSERT INTO email_template( + text, + allow_substitution, + site_id, + tag, + title, + possible_variables, + disabled + ) + VALUES ( + %s, + 1, + %s, + %s, + %s, + %s, + 0 + )", + $this->_db->makeQueryStringOrNULL($text), + $this->_db->makeQueryInteger($siteID), + $this->_db->makeQueryStringOrNULL($tag), + $this->_db->makeQueryStringOrNULL($title), + $this->_db->makeQueryStringOrNULL($possibleVariables) + ); + $queryResult = $this->_db->query($sql); + if (!$queryResult) + { + return -1; + } + $templateID = $this->_db->getLastInsertID(); + + return $templateID; + } + /** * Updates an e-mail template. * @@ -57,23 +113,47 @@ public function __construct($siteID) * @param string template text * @return boolean True if successful; false otherwise. */ - public function update($emailTemplateID, $text, $disabled) + public function update($emailTemplateID, $title, $text, $disabled) { - $sql = sprintf( - "UPDATE - email_template - SET - text = %s, - disabled = %s - WHERE - email_template_id = %s - AND - site_id = %s", - $this->_db->makeQueryStringOrNULL($text), - $disabled, - $emailTemplateID, - $this->_siteID - ); + if($title != "") + { + $sql = sprintf( + "UPDATE + email_template + SET + title = %s, + text = %s, + disabled = %s + WHERE + email_template_id = %s + AND + site_id = %s", + $this->_db->makeQueryStringOrNULL($title), + $this->_db->makeQueryStringOrNULL($text), + $disabled, + $emailTemplateID, + $this->_siteID + ); + } + else + { + $sql = sprintf( + "UPDATE + email_template + SET + text = %s, + disabled = %s + WHERE + email_template_id = %s + AND + site_id = %s", + $this->_db->makeQueryStringOrNULL($text), + $disabled, + $emailTemplateID, + $this->_siteID + ); + } + $queryResult = $this->_db->query($sql); if (!$queryResult) @@ -311,6 +391,30 @@ public function getAll() return $this->_db->getAllAssoc($sql); } + + public function getAllCustom() + { + $sql = sprintf( + "SELECT + email_template.email_template_id AS emailTemplateID, + email_template.title AS emailTemplateTitle, + email_template.tag AS emailTemplateTag, + email_template.text AS text, + email_template.possible_variables AS possibleVariables, + email_template.allow_substitution AS allowSubstitution, + email_template.disabled AS disabled + FROM + email_template + WHERE + email_template.site_id = %s + AND + email_template.tag = %s", + $this->_siteID, + $this->_db->makeQueryString("CUSTOM") + ); + + return $this->_db->getAllAssoc($sql); + } } ?> diff --git a/lib/Export.php b/lib/Export.php index f4f227cdd..cd96b1242 100755 --- a/lib/Export.php +++ b/lib/Export.php @@ -30,10 +30,10 @@ * @version $Id: Export.php 3813 2007-12-05 23:16:22Z brian $ */ -include_once('./lib/Candidates.php'); -include_once('./lib/Contacts.php'); -include_once('./lib/Companies.php'); -include_once('./lib/JobOrders.php'); +include_once(LEGACY_ROOT . '/lib/Candidates.php'); +include_once(LEGACY_ROOT . '/lib/Contacts.php'); +include_once(LEGACY_ROOT . '/lib/Companies.php'); +include_once(LEGACY_ROOT . '/lib/JobOrders.php'); /** * Data Export Utility 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/FileCompressor.php b/lib/FileCompressor.php index 3794bfde3..f8ce795c0 100755 --- a/lib/FileCompressor.php +++ b/lib/FileCompressor.php @@ -39,7 +39,7 @@ * @subpackage Library */ -include_once('./lib/HashUtility.php'); +include_once(LEGACY_ROOT . '/lib/HashUtility.php'); define('START_FILE_RECORD', 0x04034b50); define('START_DATA_DESCRIPTOR', 0x08074b50); @@ -980,7 +980,7 @@ public function __construct($filename) $this->_filename = $filename; } - private function getErrorMessage() + public function getErrorMessage() { return $this->_errorMessage; } diff --git a/lib/GraphGenerator.php b/lib/GraphGenerator.php index 32393ab43..7febba544 100755 --- a/lib/GraphGenerator.php +++ b/lib/GraphGenerator.php @@ -35,13 +35,13 @@ /* Is GD2 installed? */ if (function_exists('ImageCreateFromJpeg')) { - include_once('./lib/artichow/LinePlot.class.php'); - include_once('./lib/artichow/BarPlot.class.php'); - include_once('./lib/artichow/inc/Label.class.php'); - include_once('./lib/artichow/BarPlotPipeline.class.php'); - include_once('./lib/artichow/BarPlotDashboard.class.php'); - include_once('./lib/artichow/AntiSpam.class.php'); - include_once('./lib/artichow/Pie.class.php'); + include_once(LEGACY_ROOT . '/lib/artichow/LinePlot.class.php'); + include_once(LEGACY_ROOT . '/lib/artichow/BarPlot.class.php'); + include_once(LEGACY_ROOT . '/lib/artichow/inc/Label.class.php'); + include_once(LEGACY_ROOT . '/lib/artichow/BarPlotPipeline.class.php'); + include_once(LEGACY_ROOT . '/lib/artichow/BarPlotDashboard.class.php'); + include_once(LEGACY_ROOT . '/lib/artichow/AntiSpam.class.php'); + include_once(LEGACY_ROOT . '/lib/artichow/Pie.class.php'); } /** diff --git a/lib/Graphs.php b/lib/Graphs.php index f55300fb5..a087ffa91 100755 --- a/lib/Graphs.php +++ b/lib/Graphs.php @@ -33,7 +33,7 @@ /** * Statistics library. */ -include_once('./lib/Statistics.php'); +include_once(LEGACY_ROOT . '/lib/Statistics.php'); /** * Graph Interface Library diff --git a/lib/InstallationTests.php b/lib/InstallationTests.php index 06654de66..5b86bd2f0 100755 --- a/lib/InstallationTests.php +++ b/lib/InstallationTests.php @@ -32,7 +32,7 @@ //FIXME: Test for zlib! -include_once('./lib/FileUtility.php'); +include_once(LEGACY_ROOT . '/lib/FileUtility.php'); /** * Installation Tests Library @@ -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/JavaScriptCompressor.php b/lib/JavaScriptCompressor.php index 9cc14ef83..d99b62767 100755 --- a/lib/JavaScriptCompressor.php +++ b/lib/JavaScriptCompressor.php @@ -30,7 +30,7 @@ * @version $Id: JavaScriptCompressor.php 3587 2007-11-13 03:55:57Z will $ */ -include_once('./lib/StringUtility.php'); +include_once(LEGACY_ROOT . '/lib/StringUtility.php'); /** * JavaScript Compression Library diff --git a/lib/JobOrders.php b/lib/JobOrders.php index f95fc44f1..2c4307ae2 100755 --- a/lib/JobOrders.php +++ b/lib/JobOrders.php @@ -1,5 +1,5 @@ getExpirationDate(); } - public static function validateProfessionalKey($key = '') - { - return true; - } - // FIXME: Document me! public static function isProfessional() { diff --git a/lib/ListEditor.php b/lib/ListEditor.php index 20664bb8f..4bdb26201 100755 --- a/lib/ListEditor.php +++ b/lib/ListEditor.php @@ -36,7 +36,7 @@ define('LIST_EDITOR_REMOVE', 2); define('LIST_EDITOR_MODIFY', 3); -include_once('./lib/StringUtility.php'); +include_once(LEGACY_ROOT . '/lib/StringUtility.php'); /** diff --git a/lib/LoginActivity.php b/lib/LoginActivity.php index 3bdbd30ce..1ce2867e8 100755 --- a/lib/LoginActivity.php +++ b/lib/LoginActivity.php @@ -30,8 +30,8 @@ * @version $Id: LoginActivity.php 3587 2007-11-13 03:55:57Z will $ */ -include_once('./lib/Pager.php'); -include_once('./lib/BrowserDetection.php'); +include_once(LEGACY_ROOT . '/lib/Pager.php'); +include_once(LEGACY_ROOT . '/lib/BrowserDetection.php'); /** * Login Activity Pager diff --git a/lib/Mailer.php b/lib/Mailer.php index 8bb33003c..4ced73f23 100755 --- a/lib/Mailer.php +++ b/lib/Mailer.php @@ -39,11 +39,11 @@ /* E_STRICT doesn't like PHPMailer. */ $errorReporting = error_reporting(); error_reporting($errorReporting & ~ E_STRICT); -require './lib/phpmailer/PHPMailerAutoload.php'; +require LEGACY_ROOT . '/lib/phpmailer/PHPMailerAutoload.php'; error_reporting($errorReporting); // FIXME: Remove this dependency! Bad bad bad! -include_once('./lib/Pipelines.php'); +include_once(LEGACY_ROOT . '/lib/Pipelines.php'); define('MAILER_MODE_DISABLED', 0); define('MAILER_MODE_PHP', 1); diff --git a/lib/ModuleUtility.php b/lib/ModuleUtility.php index f9eb4b167..513e34fb9 100755 --- a/lib/ModuleUtility.php +++ b/lib/ModuleUtility.php @@ -69,8 +69,9 @@ public static function loadModule($moduleName) $moduleClass = $modules[$moduleName][0]; include_once( - 'modules/' . $moduleName . '/' - . $moduleClass . '.php' + LEGACY_ROOT . + '/modules/' . $moduleName . '/' . + $moduleClass . '.php' ); if (!eval(Hooks::get('LOAD_MODULE'))) return; @@ -92,7 +93,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); @@ -122,8 +123,9 @@ public static function moduleRequiresAuthentication($moduleName) $moduleClass = $modules[$moduleName][0]; include_once( - 'modules/' . $moduleName . '/' - . $moduleClass . '.php' + LEGACY_ROOT . + '/modules/' . $moduleName . '/' . + $moduleClass . '.php' ); $module = new $moduleClass(); @@ -354,15 +356,8 @@ private static function _fatal($error) $template = new Template(); $template->assign('errorMessage', $error); - $template->display('./Error.tpl'); - - echo ''; - - die(); + $template->display('Error.tpl'); + throw new Exception(str_replace("\n", " ", 'Fatal Error raised: ' . $error)); } /** diff --git a/lib/NewVersionCheck.php b/lib/NewVersionCheck.php index adf6e1ced..275403c4f 100755 --- a/lib/NewVersionCheck.php +++ b/lib/NewVersionCheck.php @@ -30,8 +30,8 @@ * @version $Id: NewVersionCheck.php 3634 2007-11-16 16:41:47Z brian $ */ -include_once('./lib/SystemInfo.php'); -include_once('./lib/Users.php'); +include_once(LEGACY_ROOT . '/lib/SystemInfo.php'); +include_once(LEGACY_ROOT . '/lib/Users.php'); /** * New Version Check Library diff --git a/lib/Pipelines.php b/lib/Pipelines.php index dfd3d3bcb..74ee2d5b3 100755 --- a/lib/Pipelines.php +++ b/lib/Pipelines.php @@ -30,7 +30,7 @@ * @version $Id: Pipelines.php 3593 2007-11-13 17:36:57Z andrew $ */ -include_once('./lib/History.php'); +include_once(LEGACY_ROOT . '/lib/History.php'); /** * Pipelines Library diff --git a/lib/Profile.php b/lib/Profile.php index c443ba175..9fb3881ff 100755 --- a/lib/Profile.php +++ b/lib/Profile.php @@ -30,8 +30,8 @@ * @version $Id: Profile.php 3831 2007-12-11 23:14:32Z brian $ */ -include_once('./lib/DatabaseConnection.php'); -include_once('./lib/Site.php'); +include_once(LEGACY_ROOT . '/lib/DatabaseConnection.php'); +include_once(LEGACY_ROOT . '/lib/Site.php'); class Profile { diff --git a/lib/Questionnaire.php b/lib/Questionnaire.php index 9253143e3..8a5cf6854 100755 --- a/lib/Questionnaire.php +++ b/lib/Questionnaire.php @@ -30,8 +30,8 @@ * @version $Id: Questionnaire.php 3745 2007-11-28 18:37:56Z andrew $ */ -include_once('./lib/DatabaseConnection.php'); -include_once('./lib/Candidates.php'); +include_once(LEGACY_ROOT . '/lib/DatabaseConnection.php'); +include_once(LEGACY_ROOT . '/lib/Candidates.php'); define('QUESTIONNAIRE_QUESTION_TYPE_TEXT', 1); define('QUESTIONNAIRE_QUESTION_TYPE_SELECT', 2); diff --git a/lib/QueueProcessor.php b/lib/QueueProcessor.php index e5e6d3893..aed2634e9 100755 --- a/lib/QueueProcessor.php +++ b/lib/QueueProcessor.php @@ -37,8 +37,8 @@ * @version $Id: QueueProcessor.php 3639 2007-11-16 18:02:56Z andrew $ */ -include_once('./modules/queue/constants.php'); -include_once('./lib/Mailer.php'); +include_once(LEGACY_ROOT . '/modules/queue/constants.php'); +include_once(LEGACY_ROOT . '/lib/Mailer.php'); /** * Asynchroneous Queue Processor Library diff --git a/lib/Search.php b/lib/Search.php index 0b8a6ba9c..6cbcb865a 100755 --- a/lib/Search.php +++ b/lib/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) { @@ -2024,7 +2024,7 @@ protected function fatal($error) { $template = new Template(); $template->assign('errorMessage', $error); - $template->display('./Error.tpl'); + $template->display('Error.tpl'); die(); } } 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/Statistics.php b/lib/Statistics.php index 21f319e27..3282ee011 100755 --- a/lib/Statistics.php +++ b/lib/Statistics.php @@ -30,7 +30,7 @@ * @version $Id: Statistics.php 3587 2007-11-13 03:55:57Z will $ */ -include_once('./lib/Pipelines.php'); +include_once(LEGACY_ROOT . '/lib/Pipelines.php'); /** * Statistics Library diff --git a/lib/SystemUtility.php b/lib/SystemUtility.php index 49e99d350..b29daecc7 100755 --- a/lib/SystemUtility.php +++ b/lib/SystemUtility.php @@ -30,7 +30,7 @@ * @version $Id: SystemUtility.php 3593 2007-11-13 17:36:57Z andrew $ */ -include_once('./lib/QueueProcessor.php'); +include_once(LEGACY_ROOT . '/lib/QueueProcessor.php'); /** * System Utility Library diff --git a/lib/Tags.php b/lib/Tags.php index 50c9534a0..82e3cd9a6 100644 --- a/lib/Tags.php +++ b/lib/Tags.php @@ -30,7 +30,7 @@ * @version $Id: EmailTemplates.php 3694 2007-11-26 21:11:00Z Veaceslav Vasilache $ */ -include_once('./lib/Site.php'); +include_once(LEGACY_ROOT . '/lib/Site.php'); /** * E-Mail Templates Library diff --git a/lib/Template.php b/lib/Template.php index 16858e4c4..7af64f369 100755 --- a/lib/Template.php +++ b/lib/Template.php @@ -98,7 +98,7 @@ public function addFilter($code) public function display($template) { /* File existence checking. */ - $file = realpath('./' . $template); + $file = realpath(LEGACY_ROOT . '/' . $template); if (!$file) { echo 'Template error: File \'', $template, '\' not found.', "\n\n"; diff --git a/lib/TemplateUtility.php b/lib/TemplateUtility.php index 94ad2c2c7..2efc84f88 100755 --- a/lib/TemplateUtility.php +++ b/lib/TemplateUtility.php @@ -35,10 +35,10 @@ * @version $Id: TemplateUtility.php 3835 2007-12-12 19:08:38Z brian $ */ -include_once('./vendor/autoload.php'); -include_once('Candidates.php'); -include_once('DateUtility.php'); -include_once('SystemInfo.php'); +include_once(LEGACY_ROOT . '/vendor/autoload.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; @@ -553,7 +553,7 @@ public static function printPopupContainer() echo ''; echo '
'; @@ -745,7 +745,7 @@ public static function printTabs($active, $subActive = '', $forceHighlight = '') else if (strpos($link, 'a=internalPostings') !== false) { /* Default company subtab. */ - include_once('./lib/Companies.php'); + include_once(LEGACY_ROOT . '/lib/Companies.php'); $companies = new Companies($_SESSION['CATS']->getSiteID()); $defaultCompanyID = $companies->getDefaultCompany(); @@ -838,14 +838,6 @@ public static function printFooter() echo '', "\n"; echo '', "\n"; - - if (LicenseUtility::isProfessional() && !rand(0,10)) - { - if (!LicenseUtility::validateProfessionalKey(LICENSE_KEY)) - { - CATSUtility::changeConfigSetting('LICENSE_KEY', "''"); - } - } } /** @@ -1194,7 +1186,7 @@ private static function _printCommonHeader($pageTitle, $headIncludes = array()) echo '', "\n"; echo '', "\n"; - $headIncludes[] = 'main.css'; + $headIncludes[] = 'css/main.css'; foreach ($headIncludes as $key => $filename) { @@ -1212,8 +1204,8 @@ private static function _printCommonHeader($pageTitle, $headIncludes = array()) } } - echo '', "\n"; - echo '', "\n"; + echo '', "\n"; + echo '', "\n"; echo '', "\n\n"; } diff --git a/lib/UserInterface.php b/lib/UserInterface.php index ba512370f..58be80222 100755 --- a/lib/UserInterface.php +++ b/lib/UserInterface.php @@ -253,7 +253,7 @@ protected function fatal($error, $directoryOverride = '') $this->_template->assign('active', $this); $this->_template->assign('errorMessage', $error); $this->_template->display( - './modules/' . $moduleDirectory . '/Error.tpl' + 'modules/' . $moduleDirectory . '/Error.tpl' ); $getArray = array(); diff --git a/lib/Users.php b/lib/Users.php index 0849243a3..e4b75e615 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. */ @@ -44,6 +44,7 @@ define('LOGIN_DISABLED', -3); define('LOGIN_CANT_CHANGE_PASSWORD', -4); define('LOGIN_ROOT_ONLY', -5); +define('LOGIN_PENDING_APPROVAL', -6); /* Add User status flags. */ define('ADD_USER_SUCCESS', 1); diff --git a/lib/WebForm.php b/lib/WebForm.php index 05d9569fe..e97dd5e8a 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/ActivityDataGrid.tpl b/modules/activity/ActivityDataGrid.tpl index 020e3cac8..4111575c1 100755 --- a/modules/activity/ActivityDataGrid.tpl +++ b/modules/activity/ActivityDataGrid.tpl @@ -41,7 +41,7 @@



-
+
 


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/Search.tpl b/modules/activity/Search.tpl index 00cdc2aad..77688aa50 100755 --- a/modules/activity/Search.tpl +++ b/modules/activity/Search.tpl @@ -1,5 +1,5 @@ - + active); ?>
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/Calendar.tpl b/modules/calendar/Calendar.tpl index b382162d2..bc844116b 100755 --- a/modules/calendar/Calendar.tpl +++ b/modules/calendar/Calendar.tpl @@ -1,5 +1,5 @@ - + active); ?>
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/Add.tpl b/modules/candidates/Add.tpl index c190cbf69..c2c22c91f 100755 --- a/modules/candidates/Add.tpl +++ b/modules/candidates/Add.tpl @@ -1,8 +1,8 @@ isModal): ?> - + - + active, $this->subActive); ?> diff --git a/modules/candidates/AddActivityChangeStatusModal.tpl b/modules/candidates/AddActivityChangeStatusModal.tpl index 804d55d20..1dd4a9776 100755 --- a/modules/candidates/AddActivityChangeStatusModal.tpl +++ b/modules/candidates/AddActivityChangeStatusModal.tpl @@ -1,10 +1,10 @@ isJobOrdersMode): ?> - + onlyScheduleEvent): ?> - + - + isFinishedMode): ?> diff --git a/modules/candidates/Candidates.tpl b/modules/candidates/Candidates.tpl index 969beb661..4e310ed68 100755 --- a/modules/candidates/Candidates.tpl +++ b/modules/candidates/Candidates.tpl @@ -4,10 +4,10 @@ active); ?> dataGrid->getInstanceName());?>
@@ -133,7 +133,7 @@



-
+
 


diff --git a/modules/candidates/CandidatesUI.php b/modules/candidates/CandidatesUI.php index 9bbbc11eb..06e740f07 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()) { @@ -3218,17 +3218,60 @@ private function onEmailCandidates() { $destination[] = array($emailDest, $emailDest); } - + $mailer = new Mailer(CATS_ADMIN_SITE); - // FIXME: Use sendToOne()? - $mailerStatus = $mailer->send( - array($_SESSION['CATS']->getEmail(), $_SESSION['CATS']->getEmail()), - $destination, - $emailSubject, - $emailBody, - true, - true - ); + + if($_POST['emailTemplate'] == "-1") + { + $mailerStatus = $mailer->send( + array($_SESSION['CATS']->getEmail(), $_SESSION['CATS']->getEmail()), + $destination, + $emailSubject, + $emailBody, + true, + true + ); + } + else + { + $emailTemplates = new EmailTemplates($this->_siteID); + $candidates = new Candidates($this->_siteID); + + $emailsToIDs = $_POST['candidateID']; + $candidateIDs = array(); + foreach($emailsToIDs as $email) + { + $temp = explode('=', $email); + $candidateIDs[$temp[0]] = $temp[1]; + } + foreach($candidateIDs as $email => $ID) + { + $candidateData = $candidates->get($ID); + $emailTextSubstituted = $emailTemplates->replaceVariables($emailBody); + $stringsToFind = array( + '%CANDOWNER%', + '%CANDFIRSTNAME%', + '%CANDFULLNAME%' + ); + $replacementStrings = array( + $candidateData['ownerFullName'], + $candidateData['firstName'], + $candidateData['candidateFullName'] + ); + $emailTextSubstituted = str_replace( + $stringsToFind, + $replacementStrings, + $emailTextSubstituted + ); + + $mailerStatus = $mailer->sendToOne( + array($email, $candidateData['candidateFullName']), + $emailSubject, + $emailTextSubstituted, + true + ); + } + } $this->_template->assign('active', $this); $this->_template->assign('success', true); @@ -3256,16 +3299,22 @@ private function onEmailCandidates() $db = DatabaseConnection::getInstance(); $rs = $db->getAllAssoc(sprintf( - 'SELECT candidate_id, email1, email2 ' + 'SELECT candidate_id, first_name, last_name, email1, email2 ' . 'FROM candidate ' . 'WHERE candidate_id IN (%s)', $db_str )); - + + $emailTemplates = new EmailTemplates($this->_siteID); + $emailTemplatesRS = $emailTemplates->getAllCustom(); + + //$this->_template->assign('privledgedUser', $privledgedUser); $this->_template->assign('active', $this); $this->_template->assign('success', false); + $this->_template->assign('emailTemplatesRS', $emailTemplatesRS); $this->_template->assign('recipients', $rs); + $this->_template->assign('sessionCookie', $_SESSION['CATS']->getCookie()); $this->_template->display('./modules/candidates/SendEmail.tpl'); } } diff --git a/modules/candidates/CreateAttachmentModal.tpl b/modules/candidates/CreateAttachmentModal.tpl index 0ea1c49ac..4b01e84d7 100755 --- a/modules/candidates/CreateAttachmentModal.tpl +++ b/modules/candidates/CreateAttachmentModal.tpl @@ -1,5 +1,5 @@ - + isFinishedMode){ ?>
diff --git a/modules/candidates/CreateImageAttachmentModal.tpl b/modules/candidates/CreateImageAttachmentModal.tpl index 9f2deb326..1ec76a7a9 100755 --- a/modules/candidates/CreateImageAttachmentModal.tpl +++ b/modules/candidates/CreateImageAttachmentModal.tpl @@ -1,5 +1,5 @@ - +

Edit Profile Image

isFinishedMode): ?> diff --git a/modules/candidates/Edit.tpl b/modules/candidates/Edit.tpl index e71fbae8a..baf3eb380 100755 --- a/modules/candidates/Edit.tpl +++ b/modules/candidates/Edit.tpl @@ -1,5 +1,5 @@ - + active); ?>
diff --git a/modules/candidates/Search.tpl b/modules/candidates/Search.tpl index 0efbc6e58..522012575 100755 --- a/modules/candidates/Search.tpl +++ b/modules/candidates/Search.tpl @@ -1,5 +1,5 @@ - + active); ?>
diff --git a/modules/candidates/SendEmail.tpl b/modules/candidates/SendEmail.tpl index 8103e3765..3b49b6b5f 100755 --- a/modules/candidates/SendEmail.tpl +++ b/modules/candidates/SendEmail.tpl @@ -1,5 +1,5 @@ - + active); ?>
@@ -68,6 +68,9 @@ + recipients as $data): ?> + + + + + + + '; - echo ''; + echo ''; echo ''; echo ''; echo ''; @@ -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 ' - + diff --git a/modules/install/phpVersion.php b/modules/install/phpVersion.php index 7c17273ca..bef901fd4 100755 --- a/modules/install/phpVersion.php +++ b/modules/install/phpVersion.php @@ -1,12 +1,12 @@ - +CATS - Installation Wizard Script - + diff --git a/modules/joborders/Add.tpl b/modules/joborders/Add.tpl index 3ae1b1e2e..e3e33d5bb 100755 --- a/modules/joborders/Add.tpl +++ b/modules/joborders/Add.tpl @@ -1,5 +1,5 @@ - +active, $this->subActive); ?>
@@ -109,7 +109,7 @@
@@ -85,6 +88,27 @@
+ + + + + + +
@@ -92,6 +116,9 @@ +
+
diff --git a/modules/candidates/Show.tpl b/modules/candidates/Show.tpl index 590382de5..78f63a860 100755 --- a/modules/candidates/Show.tpl +++ b/modules/candidates/Show.tpl @@ -1,11 +1,11 @@ isPopup): ?> - data['firstName'].' '.$this->data['lastName'], array( 'js/activity.js', 'js/sorttable.js', 'js/match.js', 'js/lib.js', 'js/pipeline.js', 'js/attachment.js', 'modules/candidates/quickAction-candidates.js')); ?> + data['firstName'].' '.$this->data['lastName'], array( 'js/activity.js', 'js/sorttable.js', 'js/match.js', 'js/lib.js', 'js/pipeline.js', 'js/attachment.js', 'js/candidates/quickAction.js')); ?> - data['firstName'].' '.$this->data['lastName'], array( 'js/activity.js', 'js/sorttable.js', 'js/match.js', 'js/lib.js', 'js/pipeline.js', 'js/attachment.js', 'modules/candidates/quickAction-candidates.js')); ?> + data['firstName'].' '.$this->data['lastName'], array( 'js/activity.js', 'js/sorttable.js', 'js/match.js', 'js/lib.js', 'js/pipeline.js', 'js/attachment.js', 'js/candidates/quickAction.js')); ?> active); ?> diff --git a/modules/candidates/dataGrids.php b/modules/candidates/dataGrids.php index cb5e87a68..bf62ec205 100755 --- a/modules/candidates/dataGrids.php +++ b/modules/candidates/dataGrids.php @@ -2,8 +2,8 @@ //TODO: License -include_once('lib/Candidates.php'); -include_once('./lib/Width.php'); +include_once(LEGACY_ROOT . '/lib/Candidates.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 d9d881d63..32b1d3fb5 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/Add.tpl b/modules/companies/Add.tpl index 9487743af..689a8f283 100755 --- a/modules/companies/Add.tpl +++ b/modules/companies/Add.tpl @@ -1,5 +1,5 @@ - + active, $this->subActive); ?>
diff --git a/modules/companies/Companies.tpl b/modules/companies/Companies.tpl index 5374ac111..4191b53d8 100755 --- a/modules/companies/Companies.tpl +++ b/modules/companies/Companies.tpl @@ -3,8 +3,8 @@ active); ?>
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/CreateAttachmentModal.tpl b/modules/companies/CreateAttachmentModal.tpl index 12683b2df..1c71d750f 100755 --- a/modules/companies/CreateAttachmentModal.tpl +++ b/modules/companies/CreateAttachmentModal.tpl @@ -1,5 +1,5 @@ - + isFinishedMode): ?> diff --git a/modules/companies/Edit.tpl b/modules/companies/Edit.tpl index 8ca6aba16..16e5f5d69 100755 --- a/modules/companies/Edit.tpl +++ b/modules/companies/Edit.tpl @@ -1,5 +1,5 @@ - + active); ?>
diff --git a/modules/companies/Search.tpl b/modules/companies/Search.tpl index fe2af598c..f00695053 100755 --- a/modules/companies/Search.tpl +++ b/modules/companies/Search.tpl @@ -1,5 +1,5 @@ - + active, $this->subActive); ?>
diff --git a/modules/companies/Show.tpl b/modules/companies/Show.tpl index ff6100d6a..585d308c7 100755 --- a/modules/companies/Show.tpl +++ b/modules/companies/Show.tpl @@ -1,5 +1,5 @@ data['name'], array( 'js/sorttable.js', 'js/attachment.js')); ?> @@ -239,7 +239,7 @@ use OpenCATS\UI\QuickActionMenu;

Job Orders

- +
@@ -295,7 +295,7 @@ use OpenCATS\UI\QuickActionMenu;

Contacts

-
ID Title
+
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/Add.tpl b/modules/contacts/Add.tpl index 6ca978ded..93cafef6c 100755 --- a/modules/contacts/Add.tpl +++ b/modules/contacts/Add.tpl @@ -1,5 +1,5 @@ - +active, $this->subActive); ?>
diff --git a/modules/contacts/Contacts.tpl b/modules/contacts/Contacts.tpl index af41ef8ff..3e0090c2e 100755 --- a/modules/contacts/Contacts.tpl +++ b/modules/contacts/Contacts.tpl @@ -3,8 +3,8 @@ active); ?>
@@ -86,7 +86,7 @@



-
+
 


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/Edit.tpl b/modules/contacts/Edit.tpl index 4e3963571..a05b46a7f 100755 --- a/modules/contacts/Edit.tpl +++ b/modules/contacts/Edit.tpl @@ -1,5 +1,5 @@ - + active); ?>
diff --git a/modules/contacts/Search.tpl b/modules/contacts/Search.tpl index 07500ea88..b2f29b9af 100755 --- a/modules/contacts/Search.tpl +++ b/modules/contacts/Search.tpl @@ -1,5 +1,5 @@ - + active, $this->subActive); ?>
diff --git a/modules/contacts/Show.tpl b/modules/contacts/Show.tpl index 603b3c354..7e810b56e 100755 --- a/modules/contacts/Show.tpl +++ b/modules/contacts/Show.tpl @@ -1,6 +1,6 @@ data['firstName'].' '.$this->data['lastName'], array( 'js/activity.js', 'js/attachment.js')); ?> 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/Home.tpl b/modules/home/Home.tpl index c58417af5..b1097f581 100755 --- a/modules/home/Home.tpl +++ b/modules/home/Home.tpl @@ -47,7 +47,7 @@
First Name Last Name
placedRS)): ?> -
+
 
@@ -76,7 +76,7 @@
dataGrid->printNavigation(false); ?>    dataGrid->printShowAll(); ?>       
dataGrid->getNumberOfRows()): ?> -
+
 
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/BulkResumesHelp.tpl b/modules/import/BulkResumesHelp.tpl index 9fb33383a..cdace9711 100755 --- a/modules/import/BulkResumesHelp.tpl +++ b/modules/import/BulkResumesHelp.tpl @@ -1,7 +1,7 @@
-

+

Bulk Resumes


diff --git a/modules/import/Import.tpl b/modules/import/Import.tpl index 2f11668e1..116e1614b 100755 --- a/modules/import/Import.tpl +++ b/modules/import/Import.tpl @@ -1,5 +1,5 @@ - + active, '', 'settings'); ?>
diff --git a/modules/import/Import1.tpl b/modules/import/Import1.tpl index 5bd55c7fc..87b20f710 100755 --- a/modules/import/Import1.tpl +++ b/modules/import/Import1.tpl @@ -1,5 +1,5 @@ - + active, '', 'settings'); ?>
diff --git a/modules/import/Import2.tpl b/modules/import/Import2.tpl index ec3203cd8..ed431aaba 100755 --- a/modules/import/Import2.tpl +++ b/modules/import/Import2.tpl @@ -1,5 +1,5 @@ - + active, '', 'settings'); ?>
diff --git a/modules/import/ImportCommits.tpl b/modules/import/ImportCommits.tpl index a3121dda9..9fc17545d 100755 --- a/modules/import/ImportCommits.tpl +++ b/modules/import/ImportCommits.tpl @@ -1,5 +1,5 @@ - + active); ?>
diff --git a/modules/import/ImportRecent.tpl b/modules/import/ImportRecent.tpl index 24b1ab345..ae3548310 100755 --- a/modules/import/ImportRecent.tpl +++ b/modules/import/ImportRecent.tpl @@ -1,5 +1,5 @@ - + active); ?>
diff --git a/modules/import/ImportResumesBulk.tpl b/modules/import/ImportResumesBulk.tpl index 516069edf..258b26d35 100755 --- a/modules/import/ImportResumesBulk.tpl +++ b/modules/import/ImportResumesBulk.tpl @@ -1,5 +1,5 @@ - + active, ''); ?>
diff --git a/modules/import/ImportUI.php b/modules/import/ImportUI.php index 8b4052051..727243989 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/import/MassImport.tpl b/modules/import/MassImport.tpl index 583dc4d36..0caf85870 100755 --- a/modules/import/MassImport.tpl +++ b/modules/import/MassImport.tpl @@ -2,7 +2,7 @@ active, '', 'settings'); ?> - +
diff --git a/modules/import/MassImportEdit.tpl b/modules/import/MassImportEdit.tpl index 6d447ef1c..b539481eb 100755 --- a/modules/import/MassImportEdit.tpl +++ b/modules/import/MassImportEdit.tpl @@ -3,7 +3,7 @@ active); ?> - +
@@ -249,9 +249,9 @@ @@ -259,9 +259,9 @@ 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/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 8ed6e605b..3aaad8fb9 100755 --- a/modules/install/ajax/attachmentsReindex.php +++ b/modules/install/ajax/attachmentsReindex.php @@ -25,9 +25,9 @@ * */ -include_once('./config.php'); -include_once('./lib/DatabaseConnection.php'); -include_once('./lib/ModuleUtility.php'); +include_once(LEGACY_ROOT . '/config.php'); +include_once(LEGACY_ROOT . '/lib/DatabaseConnection.php'); +include_once(LEGACY_ROOT . '/lib/ModuleUtility.php'); if (file_exists('INSTALL_BLOCK')) { @@ -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)) { diff --git a/modules/install/ajax/attachmentsToThreeDirectory.php b/modules/install/ajax/attachmentsToThreeDirectory.php index 9876e6764..93b5c551a 100755 --- a/modules/install/ajax/attachmentsToThreeDirectory.php +++ b/modules/install/ajax/attachmentsToThreeDirectory.php @@ -27,8 +27,8 @@ * $Id: attachmentsToThreeDirectory.php 2336 2007-04-14 22:01:51Z will $ */ -include_once('./config.php'); -include_once('./lib/DatabaseConnection.php'); +include_once(LEGACY_ROOT . '/config.php'); +include_once(LEGACY_ROOT . '/lib/DatabaseConnection.php'); $interface = new SecureAJAXInterface(); @@ -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/maint.php b/modules/install/ajax/maint.php index 020d99e6b..44b16a7fe 100755 --- a/modules/install/ajax/maint.php +++ b/modules/install/ajax/maint.php @@ -34,4 +34,4 @@ $maintPage = true; -include_once('index.php'); +include_once(LEGACY_ROOT . '/index.php'); diff --git a/modules/install/ajax/ui.php b/modules/install/ajax/ui.php index 435bcd837..c7a178e62 100755 --- a/modules/install/ajax/ui.php +++ b/modules/install/ajax/ui.php @@ -27,9 +27,9 @@ * $Id: ui.php 3807 2007-12-05 01:47:41Z will $ */ -include_once('./config.php'); -include_once('./lib/InstallationTests.php'); -include_once('./lib/CATSUtility.php'); +include_once(LEGACY_ROOT . '/config.php'); +include_once(LEGACY_ROOT . '/lib/InstallationTests.php'); +include_once(LEGACY_ROOT . '/lib/CATSUtility.php'); set_time_limit(300); @ini_set('memory_limit', '192M'); @@ -493,7 +493,7 @@ foreach ($optionalComponents as $index => $component) { echo '
' . htmlspecialchars($component['name']) . '   ' . htmlspecialchars($component['name']) . '   
-   +     diff --git a/modules/joborders/AddModalPopup.tpl b/modules/joborders/AddModalPopup.tpl index 01cb43877..940cc97e0 100755 --- a/modules/joborders/AddModalPopup.tpl +++ b/modules/joborders/AddModalPopup.tpl @@ -1,5 +1,5 @@ - + - -
diff --git a/modules/joborders/CreateAttachmentModal.tpl b/modules/joborders/CreateAttachmentModal.tpl index 553274868..7328565ca 100755 --- a/modules/joborders/CreateAttachmentModal.tpl +++ b/modules/joborders/CreateAttachmentModal.tpl @@ -1,5 +1,5 @@ - + isFinishedMode): ?>
diff --git a/modules/joborders/Edit.tpl b/modules/joborders/Edit.tpl index a9ba72334..e885289ad 100755 --- a/modules/joborders/Edit.tpl +++ b/modules/joborders/Edit.tpl @@ -1,5 +1,5 @@ - + active); ?>
diff --git a/modules/joborders/JobOrders.tpl b/modules/joborders/JobOrders.tpl index b4a4230b4..5a22bd41b 100755 --- a/modules/joborders/JobOrders.tpl +++ b/modules/joborders/JobOrders.tpl @@ -3,8 +3,8 @@ active); ?>
@@ -18,8 +18,6 @@

Job Orders: Home

@@ -100,7 +98,7 @@



-
+
 


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/Search.tpl b/modules/joborders/Search.tpl index 1af97de07..b33c2583b 100755 --- a/modules/joborders/Search.tpl +++ b/modules/joborders/Search.tpl @@ -1,5 +1,5 @@ - + active, $this->subActive); ?>
diff --git a/modules/joborders/Show.tpl b/modules/joborders/Show.tpl index fe02a4386..7b16c0498 100755 --- a/modules/joborders/Show.tpl +++ b/modules/joborders/Show.tpl @@ -1,5 +1,5 @@ isPopup): ?> diff --git a/modules/joborders/dataGrids.php b/modules/joborders/dataGrids.php index 6dc16dfe5..ec15feb13 100644 --- a/modules/joborders/dataGrids.php +++ b/modules/joborders/dataGrids.php @@ -31,9 +31,9 @@ * $Id: dataGrids.php 3096 2007-09-25 19:27:04Z brian $ */ -include_once('lib/JobOrders.php'); -include_once('./lib/Hooks.php'); -include_once('./lib/Width.php'); +include_once(LEGACY_ROOT . '/lib/JobOrders.php'); +include_once(LEGACY_ROOT . '/lib/Hooks.php'); +include_once(LEGACY_ROOT . '/lib/Width.php'); class JobOrdersListByViewDataGrid extends JobOrdersDataGrid { diff --git a/modules/lists/Lists.tpl b/modules/lists/Lists.tpl index ed8a51f79..ef2e5852f 100755 --- a/modules/lists/Lists.tpl +++ b/modules/lists/Lists.tpl @@ -52,7 +52,7 @@



-
+
 


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/ForgotPassword.tpl b/modules/login/ForgotPassword.tpl index 72ab65706..eced7badd 100755 --- a/modules/login/ForgotPassword.tpl +++ b/modules/login/ForgotPassword.tpl @@ -7,7 +7,7 @@ - + diff --git a/modules/login/Login.tpl b/modules/login/Login.tpl index 072312f17..e4066f71a 100755 --- a/modules/login/Login.tpl +++ b/modules/login/Login.tpl @@ -5,9 +5,9 @@ opencats - Login - + - + diff --git a/modules/login/LoginUI.php b/modules/login/LoginUI.php index 5dd51ab4f..2e3edc301 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/login/NoCookiesModal.tpl b/modules/login/NoCookiesModal.tpl index e6d2756c5..7f48ae68d 100755 --- a/modules/login/NoCookiesModal.tpl +++ b/modules/login/NoCookiesModal.tpl @@ -1,7 +1,7 @@
-

+

CATS Warning


diff --git a/modules/queue/tasks.php b/modules/queue/tasks.php index 2cfd542d4..3f07fff5a 100755 --- a/modules/queue/tasks.php +++ b/modules/queue/tasks.php @@ -36,7 +36,8 @@ /*************** ADD NEW TASKS HERE (scheduling is set inside the task) ****************/ -include_once('config.php'); +include_once(LEGACY_ROOT . '/config.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/reports/EEOReport.tpl b/modules/reports/EEOReport.tpl index 4391920bd..a90bb84b2 100755 --- a/modules/reports/EEOReport.tpl +++ b/modules/reports/EEOReport.tpl @@ -1,5 +1,5 @@ - + active, $this->subActive); ?>
diff --git a/modules/reports/GraphView.tpl b/modules/reports/GraphView.tpl index 6fce1fc2b..fc41c36a3 100755 --- a/modules/reports/GraphView.tpl +++ b/modules/reports/GraphView.tpl @@ -8,7 +8,7 @@ - + active, $this->subActive); ?> diff --git a/modules/settings/CareerPortalSettings.tpl b/modules/settings/CareerPortalSettings.tpl index 13f09c22d..bc4e4cb96 100755 --- a/modules/settings/CareerPortalSettings.tpl +++ b/modules/settings/CareerPortalSettings.tpl @@ -1,5 +1,5 @@ - + active, $this->subActive); ?> diff --git a/modules/settings/CareerPortalTemplateEdit.tpl b/modules/settings/CareerPortalTemplateEdit.tpl index e12c27032..7e1ab01e0 100755 --- a/modules/settings/CareerPortalTemplateEdit.tpl +++ b/modules/settings/CareerPortalTemplateEdit.tpl @@ -1,5 +1,5 @@ - + active, $this->subActive); ?>
diff --git a/modules/settings/ChangePassword.tpl b/modules/settings/ChangePassword.tpl index 95a2619d9..596b65bb1 100755 --- a/modules/settings/ChangePassword.tpl +++ b/modules/settings/ChangePassword.tpl @@ -1,5 +1,5 @@ - + active, $this->subActive); ?>
diff --git a/modules/settings/CustomizeCalendar.tpl b/modules/settings/CustomizeCalendar.tpl index 4a16b94c3..c38fe63b3 100755 --- a/modules/settings/CustomizeCalendar.tpl +++ b/modules/settings/CustomizeCalendar.tpl @@ -1,5 +1,5 @@ - + active, $this->subActive); ?>
diff --git a/modules/settings/CustomizeExtraFields.tpl b/modules/settings/CustomizeExtraFields.tpl index ba6307472..443caa846 100755 --- a/modules/settings/CustomizeExtraFields.tpl +++ b/modules/settings/CustomizeExtraFields.tpl @@ -1,5 +1,5 @@ - + active, ''); ?>
diff --git a/modules/settings/CustomizeReports.tpl b/modules/settings/CustomizeReports.tpl index d2f5f75d3..87eea28d8 100755 --- a/modules/settings/CustomizeReports.tpl +++ b/modules/settings/CustomizeReports.tpl @@ -1,5 +1,5 @@ - + active, $this->subActive); ?>
diff --git a/modules/settings/EEOEOCSettings.tpl b/modules/settings/EEOEOCSettings.tpl index 11c61f2f5..78526f0af 100755 --- a/modules/settings/EEOEOCSettings.tpl +++ b/modules/settings/EEOEOCSettings.tpl @@ -1,5 +1,5 @@ - + active, $this->subActive); ?>
diff --git a/modules/settings/EditUser.tpl b/modules/settings/EditUser.tpl index f1df4bf3b..460204010 100755 --- a/modules/settings/EditUser.tpl +++ b/modules/settings/EditUser.tpl @@ -1,5 +1,5 @@ - + active, $this->subActive); ?>
diff --git a/modules/settings/EmailSettings.tpl b/modules/settings/EmailSettings.tpl index 9b12b4f11..06cbf10fa 100755 --- a/modules/settings/EmailSettings.tpl +++ b/modules/settings/EmailSettings.tpl @@ -1,5 +1,5 @@ - + active, $this->subActive); ?>
diff --git a/modules/settings/EmailTemplates.tpl b/modules/settings/EmailTemplates.tpl index d0ffaf8d8..4a1d71054 100755 --- a/modules/settings/EmailTemplates.tpl +++ b/modules/settings/EmailTemplates.tpl @@ -18,6 +18,10 @@

E-Mail Templates

- + + + +
+ +
@@ -111,6 +128,15 @@
+ + + + + +
+ + +
diff --git a/modules/settings/ItemHistory.tpl b/modules/settings/ItemHistory.tpl index 07b912e98..bdf748c24 100755 --- a/modules/settings/ItemHistory.tpl +++ b/modules/settings/ItemHistory.tpl @@ -1,5 +1,5 @@ - + active, $this->subActive); ?> diff --git a/modules/settings/Localization.tpl b/modules/settings/Localization.tpl index 19456818a..c4d81bc6b 100755 --- a/modules/settings/Localization.tpl +++ b/modules/settings/Localization.tpl @@ -1,5 +1,5 @@ - + active, $this->subActive); ?>
diff --git a/modules/settings/MyProfile.tpl b/modules/settings/MyProfile.tpl index cb1771d0d..b777f0fba 100755 --- a/modules/settings/MyProfile.tpl +++ b/modules/settings/MyProfile.tpl @@ -1,5 +1,5 @@ - + active, $this->subActive); ?>
diff --git a/modules/settings/NewInstallWizard.tpl b/modules/settings/NewInstallWizard.tpl index cfe3b87c0..9063e71b2 100755 --- a/modules/settings/NewInstallWizard.tpl +++ b/modules/settings/NewInstallWizard.tpl @@ -5,9 +5,9 @@ CATS - Initial Configuration Wizard - + - + diff --git a/modules/settings/NewVersionCheck.tpl b/modules/settings/NewVersionCheck.tpl index 8f850db08..dbe85b369 100755 --- a/modules/settings/NewVersionCheck.tpl +++ b/modules/settings/NewVersionCheck.tpl @@ -1,5 +1,5 @@ - + active, $this->subActive); ?>
diff --git a/modules/settings/Passwords.tpl b/modules/settings/Passwords.tpl index ad8b8e535..e877bca99 100755 --- a/modules/settings/Passwords.tpl +++ b/modules/settings/Passwords.tpl @@ -1,5 +1,5 @@ - + active, $this->subActive); ?>
diff --git a/modules/settings/PreviewPageTop.tpl b/modules/settings/PreviewPageTop.tpl index c7c6e6a0d..613f6cab9 100755 --- a/modules/settings/PreviewPageTop.tpl +++ b/modules/settings/PreviewPageTop.tpl @@ -3,7 +3,7 @@ - + ', "\n"; + echo ' ', "\n"; foreach ($headIncludes as $key => $value) { diff --git a/modules/tests/Tests.tpl b/modules/tests/Tests.tpl index 289ae14b9..1735d5b2c 100755 --- a/modules/tests/Tests.tpl +++ b/modules/tests/Tests.tpl @@ -1,5 +1,5 @@ -reporter->printHeader(array('modules/tests/validator.js')); ?> +reporter->printHeader(array('js/tests/validator.js')); ?> reporter->printHeaderBlock(); ?>
diff --git a/modules/tests/TestsUI.php b/modules/tests/TestsUI.php index ba34aebd8..5d999c362 100755 --- a/modules/tests/TestsUI.php +++ b/modules/tests/TestsUI.php @@ -32,16 +32,16 @@ /* SimpleTest */ error_reporting(E_ALL); /* Simpletest doesn't work with E_STRICT. */ -require_once('lib/simpletest/web_tester.php'); -require_once('lib/simpletest/unit_tester.php'); -require_once('lib/simpletest/reporter.php'); -require_once('lib/simpletest/form.php'); +require_once(LEGACY_ROOT . '/lib/simpletest/web_tester.php'); +require_once(LEGACY_ROOT . '/lib/simpletest/unit_tester.php'); +require_once(LEGACY_ROOT . '/lib/simpletest/reporter.php'); +require_once(LEGACY_ROOT . '/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 @@ -95,8 +95,8 @@ private function selectTests() private function runSelectedTests() { - include('./modules/tests/testcases/WebTests.php'); - include('./modules/tests/testcases/AJAXTests.php'); + include(LEGACY_ROOT . '/modules/tests/testcases/WebTests.php'); + include(LEGACY_ROOT . '/modules/tests/testcases/AJAXTests.php'); /* FIXME: 2 groups! Web, AJAX. */ $testSuite = new TestSuite('CATS Test Suite'); 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..5a5351eec 100644 --- a/modules/tests/waitForDb.php +++ b/modules/tests/waitForDb.php @@ -1,7 +1,8 @@ 0) diff --git a/modules/toolbar/ToolbarUI.php b/modules/toolbar/ToolbarUI.php old mode 100755 new mode 100644 index bd34afccf..66d9904ac --- a/modules/toolbar/ToolbarUI.php +++ b/modules/toolbar/ToolbarUI.php @@ -27,15 +27,15 @@ * $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); +define('TOOLBAR_LIB_VERSION', 33); class ToolbarUI extends UserInterface @@ -57,6 +57,10 @@ public function handleRequest() switch ($action) { + case 'storeGenericResume': + $this->storeGenericResume(); + break; + case 'attemptLogin': $this->attemptLogin(); break; @@ -72,7 +76,11 @@ public function handleRequest() case 'authenticate': $this->authenticate(); break; - + + case 'authenticate_and_check': + $this->authenticate_and_check(); + break; + case 'checkEmailIsInSystem': $this->checkEmailIsInSystem(); break; @@ -86,7 +94,110 @@ public function handleRequest() break; } } - + + private function authenticate_and_check() { + $result = 1; + $siteID = 1; + $siteName = ''; + $username = $this->getTrimmedInput('CATSUser', $_GET); + $password = $this->getTrimmedInput('CATSPassword', $_GET); + //if(!$_SESSION['CATS']->isLoggedIn()) { + $_SESSION['CATS']->processLogin($username, $password); //force to authenticate each time + //} + + if (!$_SESSION['CATS']->isLoggedIn()) { + $result = 0; //invalid login + } else { + if($this->checkEmailExists($_GET["emailaddress"])==true) { + $result = 2; // authenticated but candiate already exists + } else + $result = 1; // authenticated and checked + } + echo($result); + flush(); + } + + private function storeGenericResume() { + $this->_authenticate(); + $storedID = -1; //default, invalid + if($this->checkEmailExists($_GET["emailaddress"])==true) { + $storedID = -2; //email already exists + } else { + switch(strtoupper($_GET["site"])) { + case "GMAIL.COM": + //store gmail resume + $storedID = $this->storeGMailFile($_GET["ftype"]); + break; + case "MONSTER.CA": + //parse monster resume + $storedID = $this->storeMonsterResume(); + break; + case "WORKPOLIS.CA": + //parse workpolis resume + $storedID = $this->storeWorkpolisResume(); + break; + case "LINKEDIN.COM": + $storedID = $this->storeLinkedInResume(); + break; + } + } + $reply = $storedID."|".strtoupper($_GET["site"]); + //if gmail, reserve third response for the type of the file that was just uploaded, and the file type + if($_GET["site"] == "GMail.com") { + $reply .= "|". $_GET["ftype"] . "|" . $_GET["resume_type"]; + } + echo($reply); + flush(); + } + + private function storeGMailFile($ftype) { + $resumeText = base64_decode(file_get_contents("php://input")); //our gmail attachment resume was previously base64 encoded + if($ftype == "resume") { + $temporaryFile = FileUtility::makeRandomTemporaryFilePath() . $_GET['resume_type']; + if (file_put_contents($temporaryFile, $resumeText) === false) { + $this->fatal('Failed to save Gmail data for parsing.'); + } + $documentToText = new DocumentToText(); + switch($_GET['resume_type']) { + case "DOC": //200 + $documentType = $documentToText->getDocumentType($temporaryFile, 'application/msword'); + break; + case "PDF": //100 + $documentType = $documentToText->getDocumentType($temporaryFile, 'application/pdf'); + break; + case "RTF": //300 + $documentType = $documentToText->getDocumentType($temporaryFile, 'application/rtf'); + break; + case "DOCX": //400, application/vnd.ms-word.document.12 + $documentType = $documentToText->getDocumentType($temporaryFile, 'application/vnd.ms-word.document.12'); + break; + default: //text html + $documentType = $documentToText->getDocumentType($temporaryFile, 'text/html'); + break; + } + + $documentToText->convert($temporaryFile, $documentType); + if ($documentToText->isError()) + { + $this->_isTextExtractionError = true; + $this->_textExtractionError = $documentToText->getError(); + $parsedText = ''; + } + else + { + $parsedText = $documentToText->getString(); + } + @unlink($temporaryFile); + $storedID = $_SESSION['CATS']->storeData($parsedText); + } else { + //store the photo directly + $storedID = $_SESSION['CATS']->storeData($resumeText); + } + + + return $storedID; + } + private function _authenticate() { /* Get username / password, and apply ASP username if applicable. */ @@ -96,22 +207,23 @@ private function _authenticate() $username = $this->getTrimmedInput('CATSUser', $_GET); $password = $this->getTrimmedInput('CATSPassword', $_GET); - if (!eval(Hooks::get('TOOLBAR_AUTHENTICATE_PRE'))) return; + //if (!eval(Hooks::get('TOOLBAR_AUTHENTICATE_PRE'))) return; - if(!$_SESSION['CATS']->isLoggedIn()) - { + //if(!$_SESSION['CATS']->isLoggedIn()) + //{ $_SESSION['CATS']->processLogin($username, $password); - } + //} - if (!eval(Hooks::get('TOOLBAR_AUTHENTICATE_POST'))) return; + //if (!eval(Hooks::get('TOOLBAR_AUTHENTICATE_POST'))) return; if (!$_SESSION['CATS']->isLoggedIn()) { //echo 'cats_authenticationFailed(); Message:You do not have permision to use the toolbar.'; - echo 'cats_authenticationFailed(); Message:'.$_SESSION['CATS']->getLoginError(); + //echo 'cats_authenticationFailed(); Message:'.$_SESSION['CATS']->getLoginError(); + echo 'Authentication Failed!'; die(); } - + /* if (!LicenseUtility::isProfessional()) { echo 'cats_authenticationFailed(); Message:The FireFox toolbar extension ' @@ -119,7 +231,7 @@ private function _authenticate() . 'more information.'; die(); } - + */ return true; } @@ -137,7 +249,6 @@ private function authenticate() echo ' EVAL=', $_GET['callback']; } } - private function getRemoteVersion() { // Obsolete function used to notify old toolbars that they are no longer supported. @@ -151,7 +262,7 @@ private function getJavaScriptLibLegacy() // FIXME: Send a JS library that just makes a button indicating that their version // is out of date. - $toolbarLibrary = @file_get_contents('./modules/toolbar/toolbarlibForLegacy.js'); + $toolbarLibrary = @file_get_contents('./js/toolbar/toolbarlibForLegacy.js'); echo $toolbarLibrary; return; } @@ -183,7 +294,340 @@ private function checkEmailIsInSystem() flush(); } + + private function checkEmailExists($email) + { + if(strlen(trim($email))==0) { + return false; //if no email is presented, automatically candidate doesn't exist + } else { + $candidates = new Candidates($this->_siteID); + $candidateID = $candidates->getIDByEmail($email); + if ($candidateID < 0) + return false; + else + return true; + } + } + + private function writeTempFile($value, $filename) { + $fp = fopen($filename, 'wb'); + fwrite($fp, $value); + fclose($fp); + } + + private function storeLinkedInResume() { + //TODO: Parse LinkedIn Resume Here + // Make a two-part extraction: overview area and the lower resume area + + /* OLD LINKEDIN CODE + $resumeText = file_get_contents("php://input"); + $temporaryFile = FileUtility::makeRandomTemporaryFilePath() . '.html'; + if (file_put_contents($temporaryFile, $resumeText) === false) + { + $this->fatal('Failed to save data for parsing.'); + } + $documentToText = new DocumentToText(); + $documentType = $documentToText->getDocumentType($temporaryFile, 'text/html'); + $documentToText->convert($temporaryFile, $documentType); + if ($documentToText->isError()) { + $this->_isTextExtractionError = true; + $this->_textExtractionError = $documentToText->getError(); + $parsedText = ''; + } else { + $parsedText = $documentToText->getString(); + } + @unlink($temporaryFile); + */ + + // ******************************************************************************************************************** + $resumeText = file_get_contents("php://input"); + $temporaryFile = 'test.pdf'; + + if (file_put_contents($temporaryFile, $resumeText) === false) + { + $this->fatal('Failed to save LinkedIn data for parsing.'); + } + + $documentToText = new DocumentToText(); + $documentType = $documentToText->getDocumentType($temporaryFile, 'application/pdf'); + + $documentToText->convert($temporaryFile, $documentType); + + if ($documentToText->isError()) + { + $this->_isTextExtractionError = true; + $this->_textExtractionError = $documentToText->getError(); + $parsedText = ''; + } + else + { + $parsedText = $documentToText->getString(); + } + + @unlink($temporaryFile); + + // ******************************************************************************************************************** + + $parsedTextArray = explode("\n", $parsedText); + $parsedTextArray2 = $parsedTextArray; + $firstLine = 0; + $lastLine = count($parsedTextArray) - 1; + + //get overview area ------------------------------------------------------- + foreach ($parsedTextArray as $line => $data) { + /* Find first line */ + if (strpos($data, 'Current') !== false && $firstLine == 0) + $firstLine = $line; + + /* Find last line */ + if (strpos($data, 'Share') !== false) + $lastLine = $line - 1; // + + /* Convert bullet points into - symbols. */ + $data = str_replace('%u2022', '-', $data); + $data = str_replace('Â', '', $data); + $data = str_replace('•', '-', $data); + $data = str_replace('â', '-', $data); + + /* Convert linkedIn-specific hardcoded Unneeded data */ + $data = str_replace('&', '&', $data); + + /* Skip unneeded Lines */ + if( (stripos($data, "see_all")===false && stripos($data, "see_less")===false) ) + $skip = false; + else + $skip = true; + + if($skip == false) + $parsedTextArray[$line] = $data; + else + $parsedTextArray[$line] = ""; + } + $parsedTextArray = array_slice($parsedTextArray, $firstLine, $lastLine - $firstLine + 1); + $parsedText = implode("\n", $parsedTextArray); + + //get lower resume area ------------------------------------------------------ + //$firstLine = $lastLine+2; + $firstLine = 0; + $lastLine = count($parsedTextArray2) - 1; + foreach ($parsedTextArray2 as $line => $data) { + /* Find first line */ + if (strpos($data, 'Summary') !== false && $firstLine == 0) + $firstLine = $line; + elseif (strpos($data, 'Experience') !== false && $firstLine == 0) + $firstLine = $line; + + /* Find last line */ + if (strpos($data, 'Contact '.$_GET['firstname'].' for:') !== false) + $lastLine = $line - 1; // + + /* Convert bullet points into - symbols. */ + $data = str_replace('%u2022', '-', $data); // + $data = str_replace('â', '-', $data); + $data = str_replace('Â', '', $data); + $data = str_replace('€Â', '', $data); + + $data = str_replace('•', '-', $data); + $data = str_replace('â', '-', $data); + + + /* Convert linkedIn-specific hardcoded Unneeded data */ + $data = str_replace('&', '&', $data); + + /* Skip unneeded Lines */ + if( stripos($data, "_logo]") ) //skip logo lines + $skip = true; + else + $skip = false; + + // $skip = false; + + if($skip == false) + $parsedTextArray2[$line] = $data; + else + $parsedTextArray2[$line] = ""; + } + if($firstLine > 0) { + $parsedTextArray2 = array_slice($parsedTextArray2, $firstLine, $lastLine - $firstLine + 1); + $parsedText .= "\n\n".implode("\n", $parsedTextArray2); + } + + $storedID = $_SESSION['CATS']->storeData($parsedText); + return $storedID; + + } + + private function storeWorkpolisResume() { + //$resumeText = $_POST['html']; + $resumeText = file_get_contents("php://input"); + + $temporaryFile = FileUtility::makeRandomTemporaryFilePath() . '.html'; + if (file_put_contents($temporaryFile, $resumeText) === false) + { + $this->fatal('Failed to save Workpolis data for parsing.'); + } + $documentToText = new DocumentToText(); + $documentType = $documentToText->getDocumentType($temporaryFile, 'text/html'); + $documentToText->convert($temporaryFile, $documentType); + if ($documentToText->isError()) + { + $this->_isTextExtractionError = true; + $this->_textExtractionError = $documentToText->getError(); + $parsedText = ''; + } + else + { + $parsedText = $documentToText->getString(); + } + + @unlink($temporaryFile); + + /* Now, we have to determine where the resume begins and ends and cut out the + * top and bottom of the resume... + */ + $parsedTextArray = explode("\n", $parsedText); + + $firstLine = 0; + $lastLine = count($parsedTextArray) - 1; + + foreach ($parsedTextArray as $line => $data) + { + /* Find first line */ + /* + if ((strpos($data, 'RESUME') !== false || strpos($data, 'CV') !== false) && + strpos($data, '^BACK_TO_TOP') !== false && + $firstLine == 0) + { + $firstLine = $line + 1; + } + */ + if (strpos($data, '***** Cover Letter *****') !== false && $firstLine == 0) + { + $firstLine = $line; + } + /* Find last line */ + if (strpos($data, 'nav_previous.gif') !== false || strpos($data, 'nav_back.gif') !== false) + { + $lastLine = $line - 1; // + } + /* TODO: Look for more keywords present at the bottom of this page + * in case Back_top_top goes away + */ + + /* Remove the back to top links from the resume to prevent indexing */ + if (strpos($data, '^BACK_TO_TOP') !== false) + { + $data = str_replace('^BACK TO TOP', '', $data); + } + + /* Convert bullet points into - symbols. */ + $data = str_replace('%u2022', '-', $data); + $data = str_replace('Â', '', $data); + $parsedTextArray[$line] = $data; + } + + $parsedTextArray = array_slice($parsedTextArray, $firstLine, $lastLine - $firstLine + 1); + + $parsedText = implode("\n", $parsedTextArray); + + /* Remember the output in the session and return to the toolbar + * the ID number of the data. + */ + + $storedID = $_SESSION['CATS']->storeData($parsedText); + + return $storedID; + } + + private function storeMonsterResume() { + //$resumeText = $_POST['html']; + $resumeText = file_get_contents("php://input"); + + $temporaryFile = FileUtility::makeRandomTemporaryFilePath() . $_GET['resume_type']; + if (file_put_contents($temporaryFile, $resumeText) === false) + { + $this->fatal('Failed to save Monster data for parsing.'); + } + $documentToText = new DocumentToText(); + switch($_GET['resume_type']) { + case "DOC": //200 + $documentType = $documentToText->getDocumentType($temporaryFile, 'application/msword'); + break; + case "PDF": //100 + $documentType = $documentToText->getDocumentType($temporaryFile, 'application/pdf'); + break; + case "RTF": //300 + $documentType = $documentToText->getDocumentType($temporaryFile, 'application/rtf'); + break; + case "DOCX": //400, application/vnd.ms-word.document.12 + $documentType = $documentToText->getDocumentType($temporaryFile, 'application/vnd.ms-word.document.12'); + break; + default: //text html + $documentType = $documentToText->getDocumentType($temporaryFile, 'text/html'); + break; + } + + $documentToText->convert($temporaryFile, $documentType); + if ($documentToText->isError()) + { + $this->_isTextExtractionError = true; + $this->_textExtractionError = $documentToText->getError(); + $parsedText = ''; + } + else + { + $parsedText = $documentToText->getString(); + } + + @unlink($temporaryFile); + + //temp ------------------------------------- + //$this->writeTempFile($resumeText, "RESUME_DATA.".$_GET['resume_type']); + // ----------------------------------------- + + + /* Now, we have to determine where the resume begins and ends and cut out the + * top and bottom of the resume... + */ + $parsedTextArray = explode("\n", $parsedText); + + $firstLine = 0; + $lastLine = count($parsedTextArray) - 1; + + foreach ($parsedTextArray as $line => $data) { + //first line + if (strpos($data, 'Resume ID') !== false && $firstLine == 0) + $firstLine = $line + 1; + + /* Find last line */ + if (strpos($data, '**** Activity ****') !== false) + $lastLine = $line - 1; + + /* Remove the back to top links from the resume to prevent indexing */ + if (strpos($data, '^BACK_TO_TOP') !== false) + $data = str_replace('^BACK TO TOP', '', $data); + + /* Convert bullet points into - symbols. */ + $data = str_replace('%u2022', '-', $data); + $data = str_replace('Â', '', $data); //· + $data = str_replace('Ã', '', $data); + $data = str_replace('·', '-', $data); + $parsedTextArray[$line] = $data; + } + + $parsedTextArray = array_slice($parsedTextArray, $firstLine, $lastLine - $firstLine + 1); + $parsedText = implode("\n", $parsedTextArray); + + //if( ($lastLine - $firstLine) <= 0) { + //add other info + $parsedText .= "\n".$_GET["other_info"]; + //} + + $storedID = $_SESSION['CATS']->storeData($parsedText); + return $storedID; + } + private function storeMonsterResumeText() { $this->_authenticate(); @@ -286,4 +730,4 @@ public function getLicenseKey() } } -?> +?> \ No newline at end of file diff --git a/modules/wizard/Show.tpl b/modules/wizard/Show.tpl index 068521df5..ad36476f6 100755 --- a/modules/wizard/Show.tpl +++ b/modules/wizard/Show.tpl @@ -6,8 +6,8 @@ - - + + jsInclude != ''): ?> 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..6a2b48948 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) { @@ -2437,7 +2437,7 @@ protected function fatal($error) { $template = new Template(); $template->assign('errorMessage', $error); - $template->display('./Error.tpl'); + $template->display('Error.tpl'); die(); } } diff --git a/optional-updates/latest-sphinx-search/config.php b/optional-updates/latest-sphinx-search/config.php deleted file mode 100644 index 3391fe599..000000000 --- a/optional-updates/latest-sphinx-search/config.php +++ /dev/null @@ -1,249 +0,0 @@ - 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..e6a70579f 100755 --- a/scripts/makeBackup.php +++ b/scripts/makeBackup.php @@ -54,10 +54,10 @@ $CATSHome = realpath(dirname(__FILE__) . '/../'); 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 . '/config.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); } @@ -67,10 +67,10 @@ fwrite($stderr, "Site ID is usually 1.\n"); } -include_once('./config.php'); -include_once('./constants.php'); -include_once('./lib/DatabaseConnection.php'); -include_once('modules/install/backupDB.php'); +include_once(LEGACY_ROOT . '/config.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) { @@ -274,7 +274,7 @@ function dumpAttachments($db, $directory, $siteID) if (file_exists('modules/s3storage')) { - include_once('modules/s3storage/lib.php'); + include_once(LEGACY_ROOT . '/modules/s3storage/lib.php'); $s3storage = new S3Storage(); $s3storage->getTemporarilyFromS3Storage($row['attachment_id']); 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/test/behat.yml b/test/behat.yml deleted file mode 100644 index 12e3403af..000000000 --- a/test/behat.yml +++ /dev/null @@ -1,21 +0,0 @@ -default: - suites: - default: - paths: [ %paths.base%/features ] - contexts: - - FeatureContext - filters: - tags: @core - security: - paths: [ %paths.base%/features ] - contexts: - - SecurityContext - filters: - tags: @security - extensions: - Behat\MinkExtension: - base_url: http://opencats - goutte: ~ - selenium2: - wd_host: 'http://selenium:4444/wd/hub' - browser: 'chrome' diff --git a/test/config.php b/test/config.php deleted file mode 100644 index e2e2da7f6..000000000 --- a/test/config.php +++ /dev/null @@ -1,275 +0,0 @@ - 'Hire', - 'C' => 'Contract', - 'C2H' => 'Contract To Hire', - 'FL' => 'Freelance' -); - -?> diff --git a/test/features/bootstrap/FeatureContext.php b/test/features/bootstrap/FeatureContext.php deleted file mode 100644 index b1b772abe..000000000 --- a/test/features/bootstrap/FeatureContext.php +++ /dev/null @@ -1,456 +0,0 @@ -roleData = array( - 'Administrator' => new Role('admin', 'admin'), - 'User' => new Role('john@mycompany.net', 'john99') - ); - } - - /** - * @Given I am authenticated as :role - */ - public function iAmAuthenticatedAs($role) - { - $roleData = empty($this->roleData[$role]) ? null : $this->roleData[$role]; - if (!$roleData) { - throw new PendingException(); - } - $this->iLoginAs($roleData->getUserName(), $roleData->getPassword()); - } - - /** - * @Given There is a person called :fullName with :property - */ - public function thereIsAPersonCalledWith($fullName, $property) - { - $this->visitPath('/index.php?m=candidates&a=add'); - list($firstName, $lastName) = explode(" ", $fullName); - $this->fillField('firstName', $firstName); - $this->fillField('lastName', $lastName); - list($key, $value) = explode("=", $property); - $this->fillField($key, $value); - $this->pressButton('Add Candidate'); - } - - /** - * @Given I am spoofing a session with :cookieValue cookie - */ - public function iAmSpoofingASessionWithCookie($cookieValue) - { - $this->getSession()->setCookie(CATS_SESSION_NAME, $cookieValue); - } - - /** - * @Given I wait for :element - */ - public function iWaitFor($element) - { - $this->spins(function() use ($element) { - $field = $this->getSession()->getPage()->find('css', $element); - if (null === $field) { - throw new Exception('form field ' . $element . 'id|name|label|value|placeholder'); - } - }); - } - - /** - * @Then /^I wait for the activity note box to appear$/ - */ - public function iWaitForTheSuggestionBoxToAppear() - { - $this->getSession()->wait(5000, "$('iframe', parent.document).length > 0"); - } - - public function spins($closure, $tries = 10) - { - for ($i = 0; $i <= $tries; $i++) { - try { - $closure(); - - return; - } catch (\Exception $e) { - if ($i == $tries) { - throw $e; - } - } - - sleep(1); - } - } - - /** - * @BeforeScenario - */ - public function cacheScenarioName($event) - { - // it's only to have a clean screenshot name later - $this->scenarioTitle = $event->getScenario()->getTitle(); - } - - /** - * @AfterStep - */ - public function takeScreenshotAfterFailedStep($event) - { - if ($event->getTestResult()->getResultCode() !== TestResult::FAILED) { - return; - } - - $this->takeAScreenshot(); - } - - /** - * @Then take a screenshot - */ - public function takeAScreenshot() - { - if (!$this->isJavascript()) { - print "Screenshot cannot be taken from non javascript scenario.\n"; - - return; - } - - $screenshot = $this->getSession()->getDriver()->getScreenshot(); - - $filename = $this->getScreenshotFilename(); - file_put_contents($filename, $screenshot); - - $url = $this->getScreenshotUrl($filename); - - print sprintf("Screenshot is available :\n%s", $url); - } - - protected function getScreenshotUrl($filename) - { - if (!self::$wsendUser) { - self::$wsendUser = $this->getWsendUser(); - } - exec(sprintf( - 'curl -F "uid=%s" -F "filehandle=@%s" %s 2>/dev/null', - self::$wsendUser, - $filename, - 'https://wsend.net/upload_cli' - ), $output); - return $output[0]; - } - - protected function getWsendUser() - { - // create a wsend anonymous user - $curl = curl_init('https://wsend.net/createunreg'); - curl_setopt($curl, CURLOPT_POSTFIELDS, 'start=1'); - curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); - - $wsendUser = curl_exec($curl); - curl_close($curl); - - return $wsendUser; - } - - protected function getScreenshotFilename() - { - $filename = $this->scenarioTitle; - $filename = preg_replace("#[^a-zA-Z0-9\._-]#", '_', $filename); - - return sprintf('%s/%s.png', sys_get_temp_dir(), $filename); - } - - protected function isJavascript() - { - return $this->getSession()->getDriver() instanceof Selenium2Driver; - } - - /** - * @Given /^I switch to the iframe "([^"]*)"$/ - */ - public function iSwitchToIframe($iFrameId) - { - if (empty($iFrameId)) { - $this->getSession()->switchToIframe(null); - } else { - $this->getSession()->wait(5000, "$('iframe', parent.document).length > 0"); - $check = 1; //@todo need to check using js if exists - if($check <= 0) { - throw new \Exception('Element not found'); - } else { - $javascript = " - (function(){ - var elem = document.getElementById('$iFrameId'); - var iframes = elem.getElementsByTagName('iframe'); - var f = iframes[0]; - f.id = \"no_name_iframe\"; - })()"; - $this->getSession()->executeScript($javascript); - } - $this->getSession()->switchToIframe("no_name_iframe"); - } - } - - /** - * @Given There is a company called :companyName - */ - public function thereIsACompanyCalled($companyName) - { - $siteId = $this->getSiteId(); - $company= new Company( - $siteId, - $companyName - ); - $CompanyRepository = new CompanyRepository(DatabaseConnection::getInstance()); - $CompanyRepository->persist($company, new Dummy_History($siteId)); - } - - /** - * @Given There is a user :userName named :fullName with :password password - */ - public function thereIsAUserWithParams($userName, $fullName, $password) { - list($firstName, $lastName) = explode(" ", $fullName); - $siteId = $this->getSiteId(); - $users = new Users($siteId); - $users->add( - $lastName, - $firstName, - '', - $userName, - $password, - ACCESS_LEVEL_DELETE - ); - } - - /** - * @When /^(?:|I )should see "([^"]*)" in alert popup$/ - * - * @param string $message The message. - * - * @return bool - */ - public function assertPopupMessage($message) - { - return strpos( - $this->getSession()->getDriver()->getWebDriverSession()->getAlert_text(), - $message - ) != -1; - } - - /** - * @When /^(?:|I )confirm the popup$/ - */ - public function confirmPopup() - { - $this->getSession()->getDriver()->getWebDriverSession()->accept_alert(); - } - - /** - * @Given I manually press :key - */ - public function manuallyPress($key) - { - $script = "jQuery.event.trigger({ type : 'keypress', which : '" . $key . "' });"; - $this->getSession()->evaluateScript($script); - } - - /** Click on the element with the provided xpath query - * - * @When I click on the element :locator - */ - public function iClickOnTheElement($locator) - { - $this->clickOnTheElement($locator); - } - - private function clickOnTheElement($locator, $retries = 15) - { - $element = $this->getSession()->getPage()->find('css', $locator); // runs the actual query and returns the element - // errors must not pass silently - if (null === $element) { - throw new \InvalidArgumentException(sprintf('Could not evaluate CSS selector: "%s"', $locator)); - } - try { - $element->click(); - } catch(Exception $e) { - if ($retries > 0) { - print_r("Retry stale element. Retries: " . $retries); - sleep(1); - $this->clickOnTheElement($locator, $retries -1); - } else { - print_r("Do not retry stale element. Retries: " . $retries); - throw $e; - } - } - } - - /** - * @When I select :option in the :selectLocator select - */ - public function selectState($option, $selectLocator) { - $page = $this->getSession()->getPage(); - $selectElement = $page->find('css', $selectLocator); - if (null === $selectElement) { - throw new \InvalidArgumentException(sprintf('Could not evaluate CSS selector: "%s"', $selectLocator)); - } - $selectElement->selectOption($option); - sleep(1); - } - - private function getSiteId() - { - $site = new Site(-1); - return $site->getFirstSiteID(); - } - - /** - * @Given There is a job order for a :jobTitle for :companyName - */ - public function thereIsAJobOrderForAFor($jobTitle, $companyName) - { - $siteId = $this->getSiteId(); - $CompanyRepository = new CompanyRepository(DatabaseConnection::getInstance()); - $companies = $CompanyRepository->findByName($siteId, $companyName); - $companyId = $companies[0]['companyID']; - $jobOrder = JobOrder::create( - $siteId, - $jobTitle, - $companyId, - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '' - ); - $JobOrderRepository = new JobOrderRepository(DatabaseConnection::getInstance()); - $JobOrderRepository->persist($jobOrder, new Dummy_History($siteId)); - } - - /** - * @Given I login as :username :password - */ - public function iLoginAs($username, $password) - { - $this->visitPath('/index.php?m=login'); - $this->fillField('username', $username); - $this->fillField('password', $password); - $this->pressButton('Login'); - - } - - /** - * Looks for a table, then looks for a row that contains the given text. - * Once it finds the right row, it clicks a link in that row. - * - * Really handy when you have a generic "Edit" link on each row of - * a table, and you want to click a specific one (e.g. the "Edit" link - * in the row that contains "Item #2") - * - * @When I click on :linkName on the row containing :rowText - */ - public function iClickOnOnTheRowContaining($linkName, $rowText) - { - /** @var $row \Behat\Mink\Element\NodeElement */ - $row = $this->getSession()->getPage()->find('css', sprintf('table tr:contains("%s")', $rowText)); - if (!$row) { - throw new \Exception(sprintf('Cannot find any row on the page containing the text "%s"', $rowText)); - } - $row->clickLink($linkName); - } - - /** - * @override: @Then /^the "(?P[^"]*)" element should contain "(?P(?:[^"]|\\")*)"$/ - */ - public function assertElementContains($selector, $value) - { - $selectorType = 'css'; - $html = $this->fixStepArgument($value); - $element = $this->assertSession()->elementExists($selectorType, $selector); - $actual = $element->getOuterHtml(); - $regex = '/'.preg_quote($html, '/').'/umi'; - - $message = sprintf( - 'The regex "%s" does not matches HTML %s.', - $regex, - $actual - ); - - if (!preg_match($regex, $actual)) { - throw new ElementHtmlException($message, $this->getSession()->getDriver(), $element); - } - } -} - -class Role -{ - private $userName; - private $password; - - function __construct($userName, $password) - { - $this->userName = $userName; - $this->password = $password; - } - - function getUserName() - { - return $this->userName; - } - - function getPassword() - { - return $this->password; - } -} - -// FIXME: Should abstract session from history -class Dummy_History extends History -{ - public function __construct($siteID) {} - public function storeHistoryNew($dataItemType, $dataItemID) {} -} diff --git a/test/features/bootstrap/SecurityContext.php b/test/features/bootstrap/SecurityContext.php deleted file mode 100644 index f4f85ce09..000000000 --- a/test/features/bootstrap/SecurityContext.php +++ /dev/null @@ -1,239 +0,0 @@ -accessLevel = $accessLevel; - switch($accessLevel) - { - case 'DISABLED': - $username = "testerDisabled"; - $password = "tester"; - break; - case 'READONLY': - $username = "testerRead"; - $password = "tester"; - break; - case 'EDIT': - $username = "testerEdit"; - $password = "tester"; - break; - case 'DELETE': - $username = "testerDelete"; - $password = "tester"; - break; - case 'DEMO': - $username = "testerDemo"; - $password = "tester"; - break; - case 'ADMIN': - $username = "testerSA"; - $password = "tester"; - break; - case 'MULTI_ADMIN': - $username = "testerMultiSA"; - $password = "tester"; - break; - case 'ROOT': - $username = "testerRoot"; - $password = "tester"; - break; - default: - throw new PendingException(); - } - - $this->visitPath('/index.php?m=login&a=logout'); - $this->visitPath('/index.php?m=login'); - $this->fillField('username', $username); - $this->fillField('password', $password); - $this->pressButton('Login'); - } - - /** - * @When I do :type request on url :url - */ - public function whenIDoRequestOnUrl($type, $url) - { - switch($type){ - case "GET": - $this->iDoGETRequest($url); - break; - case "POST": - $this->iDoPOSTRequest($url); - break; - default: - throw new PendingException(); - - } - } - - /** - * @When I do POST request :url - */ - public function iDoPOSTRequest($url) - { - $url = rtrim($this->getMinkParameter('base_url'), '/') . '/'.$url; - $data = array('postback' => 'postback'); - - // use key 'http' even if you send the request to https://... - $options = array( - 'http' => array( - 'header' => "Content-type: application/x-www-form-urlencoded\r\n"."Cookie: CATS=".$this->getSession()->getCookie('CATS')."\r\n", - 'method' => 'POST', - 'content' => http_build_query($data) - ) - ); - $context = stream_context_create($options); - $this->result = file_get_contents($url, false, $context); - } - - /** - * @When I do GET request :url - */ - public function iDoGETRequest($url) - { - $opts = array( - 'http'=>array( - 'method'=>"GET", - 'header'=> "Cookie: CATS=".$this->getSession()->getCookie('CATS')."\r\n" - ) - ); - - $context = stream_context_create($opts); - $url = rtrim($this->getMinkParameter('base_url'), '/') . '/'.$url.'&'; - $this->result = file_get_contents($url, false, $context); - } - - /** - * @Then /^the response should contain "(?P(?:[^"]|\\")*)"$/ - */ - public function theResponseShouldContain($text) - { - $response = $this->result; - $position = strpos($response, $text); - if($position === false) - { - throw new ExpectationException("'".$text."' was not found in the response from this request and it should be", $this->getSession()); - } - } - - /** - * @Then `/^the response should not contain "(?P(?:[^"]|\\")*)"$/` - */ - public function theResponseShouldNotContain($text) - { - $response = $this->result; - $position = strpos($response, $text); - if($position !== false) - { - throw new ExpectationException("'".$text."' was found in the response from this request and it should be not", $this->getSession()); - } - } - - /** - * @Then I should have permission - */ - public function iShouldHavePermission() - { - $this->theResponseShouldNotContain("You don't have permission"); - $this->theResponseShouldNotContain("Invalid user level for action"); - $this->theResponseShouldNotContain("opencats - Login"); - } - - /** - * @Then I should not have permission - */ - public function iShouldNotHavePermission() - { - - if($this->accessLevel == "DISABLED") - { - $this->theResponseShouldContain("opencats - Login"); - return; - } - $expectedTexts = array("You don't have permission", "Invalid user level for action", "You are not allowed to change your password."); - $response = $this->result; - - foreach ($expectedTexts as &$text) - { - $position = strpos($response, $text); - if($position !== false) - { - return; - } - } - throw new ExpectationException("'".$expectedTexts[0]."' was not found in the response from this request and it should be", $this->getSession()); - } - - /** - * @When I follow link :name - */ - public function iFollowLink($name) - { - $link = $this->getSession()->getPage()->findLink($name); - if($link !== null) - { - $link->click(); - } - } - - /** - * @Then the page should contain :text - */ - public function assertHTMLcontains($text) - { - $this->assertSession()->responseContains($text); - } - - /** - * @Then the page should not contain :text - */ - public function assertHTMLnotContains($text) - { - $this->assertSession()->responseNotContains($text); - } - - /** - * @Then I will log out - */ - public function iWillLogOut() - { - $this->clickLink('Logout'); - } - -} diff --git a/test/runAllTests.sh b/test/runAllTests.sh index c0fa4d818..43ec02834 100755 --- a/test/runAllTests.sh +++ b/test/runAllTests.sh @@ -1,8 +1,6 @@ #!/bin/sh -x -cd /var/www/public/ -dockerize -wait tcp://opencats_test_mariadb:3306 -wait http://opencats_test_web:80 -timeout 30s +cd /var/www/ +dockerize -wait tcp://opencats_test_mariadb:3306 -wait http://opencats_test_web:80 -timeout 60s php modules/tests/waitForDb.php -cat config.php -./vendor/bin/phpunit src/OpenCATS/Tests/IntegrationTests -./vendor/bin/behat -v -c ./test/behat.yml --suite="default" -./vendor/bin/behat -v -c ./test/behat.yml --suite="security" +cd /var/www/code +./vendor/bin/codecept run -c src/AppBundle/ acceptance diff --git a/test/runUnitTests.sh b/test/runUnitTests.sh new file mode 100755 index 000000000..1b288bace --- /dev/null +++ b/test/runUnitTests.sh @@ -0,0 +1,5 @@ +#!/bin/sh -x +cd /var/www/ +dockerize -wait tcp://docker_unittestdb_1:3306 -timeout 60s +cd /var/www/code +./vendor/bin/codecept run -c src/AppBundle/ unit 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()); ?>