diff --git a/.gitignore b/.gitignore index 44480f8f..badfd581 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,7 @@ docker/persist/* vendor/* attachments/* temp/* +uploads/* # Ignore Mac DS_Store files .DS_Store /vendor/ diff --git a/.travis.yml b/.travis.yml index 33922e61..e3a03398 100644 --- a/.travis.yml +++ b/.travis.yml @@ -41,6 +41,7 @@ deploy: file: - $TRAVIS_BUILD_DIR/opencats-$TRAVIS_TAG-full.tar.gz - $TRAVIS_BUILD_DIR/opencats-$TRAVIS_TAG-full.zip - skip_cleanup: true on: + repo: opencats/OpenCATS tags: true + skip_cleanup: true diff --git a/constants.php b/constants.php index e976c799..0e8ca169 100644 --- a/constants.php +++ b/constants.php @@ -46,7 +46,7 @@ /* Copyright information at bottom of pages. */ -define('COPYRIGHT_HTML', '© 2007-2023 OpenCATS.'); +define('COPYRIGHT_HTML', ''); /* HTTP response codes. */ define('HTTP_OK', 200); diff --git a/lib/CommonErrors.php b/lib/CommonErrors.php index ceab53b5..c231f594 100755 --- a/lib/CommonErrors.php +++ b/lib/CommonErrors.php @@ -94,7 +94,7 @@ public static function fatal($code, $active, $customMessage = '', $modal = false $errorTitle = 'Invalid Information'; $internalErrorTitle = 'Bad Input'; $errorMessage = 'Some of the information you provided doesn\'t follow the correct format and ' - . 'CATS can\'t interpret what it is. Please go back and ' + . 'CATS can\'t interpret what it is. Please go back and ' . 'complete each field paying close attention to any instructions provided. ' . '

' . $customMessage . ''; break; @@ -127,7 +127,7 @@ public static function fatal($code, $active, $customMessage = '', $modal = false . 'traffic or older web browsers. The latest version of the ' . 'Mozilla Firefox© browser ' . 'is recommended.

The problem may be resolved by using the ' - . 'back button on your browser and trying again.'; + . 'back button on your browser and trying again.'; break; case COMMONERROR_BADINDEX: $errorTitle = 'Bad Server Information'; @@ -142,7 +142,7 @@ public static function fatal($code, $active, $customMessage = '', $modal = false . 'may have been provided to you.' . '

' . 'It\'s ok! CATS can\'t complete whatever action you requested; but chances are, ' - . 'if you click the back button and refresh the page ' + . 'if you click the back button and refresh the page ' . 'and try again it will work just fine.'; break; @@ -151,7 +151,7 @@ public static function fatal($code, $active, $customMessage = '', $modal = false $internalErrorTitle = 'Permission Denied'; $errorMessage = 'You don\'t have access to the action you\'re attempting to perform. If you ' . 'feel you should have access, contact your site administrator. ' - . 'You can click the back button on your browser to return ' + . 'You can click the back button on your browser to return ' . 'to where you came from.'; break; @@ -172,7 +172,7 @@ public static function fatal($code, $active, $customMessage = '', $modal = false $internalErrorTitle = 'Required Fields Missing'; $errorMessage = 'One or more of the input fields on the page you came from were required and ' . 'were left with blank or incorrect values. The action you\'re trying to perform cannot ' - . 'be completed without those fields. Please use the back button ' + . 'be completed without those fields. Please use the back button ' . 'on your browser to return to where you came from.' . '

'; @@ -191,7 +191,7 @@ public static function fatal($code, $active, $customMessage = '', $modal = false $internalErrorTitle = 'Missing wild card string'; $errorMessage = 'One or more of the input fields on the page you came from were required and ' . 'were left with blank or incorrect values. The action you\'re trying to perform cannot ' - . 'be completed without those fields. Please use the back button ' + . 'be completed without those fields. Please use the back button ' . 'on your browser to return to where you came from.' . '

'; @@ -208,7 +208,7 @@ public static function fatal($code, $active, $customMessage = '', $modal = false case COMMONERROR_NOPASSWORDMATCH: $errorTitle = 'Passwords do not Match'; $internalErrorTitle = 'Passwords do not match'; - $errorMessage = 'The passwords you entered do not match. Please use the ' + $errorMessage = 'The passwords you entered do not match. Please use the ' . 'back button on your browser to return from where you came and enter the correct password ' . 'in all required fields.'; break; @@ -217,7 +217,7 @@ public static function fatal($code, $active, $customMessage = '', $modal = false $errorTitle = 'File Does Not Exist'; $internalErrorTitle = 'File Does Not Exist'; $errorMessage = 'The file you are requesting for does not exist. Please use the ' - . 'back button on your browser to return to where ' + . 'back button on your browser to return to where ' . 'you came from.

'; if (! empty($customMessage)) { @@ -229,7 +229,7 @@ public static function fatal($code, $active, $customMessage = '', $modal = false $errorTitle = 'An Error Has Occurred'; $internalErrorTitle = 'Undefined'; $errorMessage = 'An error has occurred and the operation you were attempting to perform cannot be ' - . 'completed. Please use the back button on your web browser ' + . 'completed. Please use the back button on your web browser ' . 'to return from where you came. The administrators have been notified, so you may wish to ' . 'try again later.'; break; diff --git a/lib/FileUtility.php b/lib/FileUtility.php index e1596904..4bf8d8f8 100755 --- a/lib/FileUtility.php +++ b/lib/FileUtility.php @@ -174,17 +174,17 @@ public static function makeSafeFilename($filename) /* Use a whitelist instead of a blacklist to prevent possible bypasses */ /* - * if (!preg_match("/(?i)\.(pdf|docx?|rtf|odt?g?|txt|wpd|jpe?g|png|csv|xlsx?|ppt|msg|heic|tiff?|html?|bmp|wps|xps)$/i", $fileExtension)) + * if (!preg_match("/(?i)\.(pdf|docx?|rtf|odt?g?|txt|wpd|jpe?g|png|csv|xlsx?|ppt|msg|heic|tiff?|html?|bmp|wps|xps)$/i", $fileExtension)) + */ + $GoodFileExtensions = ['bak', 'bmp', 'csv', 'doc', 'docx', 'heic', 'html', 'jpeg', 'jpg', 'msg', 'odg', 'odt', 'pages', 'pdf', 'png', 'ppt', 'pptx', 'rtf', 'tiff', 'txt', 'wpd', 'wps', 'xls', 'xlsx', 'xps']; + // if (! in_array($fileExtension, $GoodFileExtensions)) { + // $filename .= ".txt"; + // } + /* + * if (in_array($fileExtension, $GLOBALS['badFileExtensions'])) { + * $filename .= '.txt'; + * } */ - $GoodFileExtensions = ['bak', 'bmp', 'csv', 'doc', 'docx', 'heic', 'html', 'jpeg', 'jpg', 'msg', 'odg', 'odt', 'pages', 'pdf', 'png', 'ppt', 'pptx', 'rtf', 'tiff', 'wpd', 'wps', 'xls', 'xlsx', 'xps']; - // if (! in_array($fileExtension, $GoodFileExtensions)) { - // $filename .= ".txt"; - // } - /* if (in_array($fileExtension, $GLOBALS['badFileExtensions'])) - * { - * $filename .= '.txt'; - } - */ return $filename; } diff --git a/lib/StringUtility.php b/lib/StringUtility.php index 98d55083..4a4a2ac1 100644 --- a/lib/StringUtility.php +++ b/lib/StringUtility.php @@ -493,22 +493,22 @@ public static function makeInitialName( } if ($lastCommaFirst) { - $firstInitial = $firstName[0] . '.'; + $firstInitial = mb_substr($firstName, 0, 1) . '.'; if (strlen((string) $lastName) > $maxLength) { return ucwords( - substr((string) $lastName, 0, $maxLength) . ', ' . $firstInitial + mb_substr($lastName, 0, $maxLength) . ', ' . $firstInitial ); } return ucwords($lastName . ', ' . $firstInitial); } - $lastInitial = $lastName[0] . '.'; + $lastInitial = mb_substr($lastName, 0, 1) . '.'; if (strlen((string) $firstName) > $maxLength) { return ucwords( - substr((string) $firstName, 0, $maxLength) . ' ' . $lastInitial + mb_substr($firstName, 0, $maxLength) . ' ' . $lastInitial ); } diff --git a/modules/attachments/AttachmentsUI.php b/modules/attachments/AttachmentsUI.php index bc188776..82d6b2e5 100644 --- a/modules/attachments/AttachmentsUI.php +++ b/modules/attachments/AttachmentsUI.php @@ -39,7 +39,7 @@ public function __construct() { parent::__construct(); - $this->_authenticationRequired = false; + $this->_authenticationRequired = true; $this->_moduleDirectory = 'attachments'; $this->_moduleName = 'attachments'; $this->_moduleTabText = ''; diff --git a/modules/candidates/Edit.tpl b/modules/candidates/Edit.tpl index 80bf1bab..fc7acfac 100644 --- a/modules/candidates/Edit.tpl +++ b/modules/candidates/Edit.tpl @@ -37,7 +37,7 @@ - +  * @@ -55,7 +55,7 @@ - +  * diff --git a/modules/candidates/validator.js b/modules/candidates/validator.js index 5ac2627e..d2b724aa 100644 --- a/modules/candidates/validator.js +++ b/modules/candidates/validator.js @@ -30,6 +30,7 @@ function checkEditForm(form) errorMessage += checkFirstName(); errorMessage += checkLastName(); + errorMessage += checkOwner(); if (errorMessage != '') { @@ -173,6 +174,26 @@ function checkLastName() return errorMessage; } +function checkOwner() +{ + var errorMessage = ''; + + fieldValue = document.getElementById('owner').selectedIndex; + fieldLabel = document.getElementById('ownerLabel'); + if (fieldValue == '') + { + errorMessage = " - You must select an owner.\n"; + + fieldLabel.style.color = '#ff0000'; + } + else + { + fieldLabel.style.color = '#000'; + } + + return errorMessage; +} + function checkSearchFullName() { var errorMessage = ''; diff --git a/modules/import/ImportUI.php b/modules/import/ImportUI.php index e24b9858..79fd5d79 100644 --- a/modules/import/ImportUI.php +++ b/modules/import/ImportUI.php @@ -1528,7 +1528,7 @@ public function massImport($step = 1) 'errorMessage', 'You didn\'t upload any files or there was a ' . 'problem working with any files you uploaded. Please use the ' - . 'Back button on your web browser ' + . 'Back button on your web browser ' . 'and select one or more files to import.' ); diff --git a/modules/joborders/Add.tpl b/modules/joborders/Add.tpl index 71def8ba..dd488dd2 100644 --- a/modules/joborders/Add.tpl +++ b/modules/joborders/Add.tpl @@ -67,7 +67,7 @@

defaultCompanyID !== false): ?> -  Internal Posting
+  defaultCompanyRS['name']); ?>
diff --git a/modules/joborders/Edit.tpl b/modules/joborders/Edit.tpl index 3414b5b2..c53dc09f 100644 --- a/modules/joborders/Edit.tpl +++ b/modules/joborders/Edit.tpl @@ -75,7 +75,7 @@ defaultCompanyID !== false): ?> - defaultCompanyID == $this->data['companyID']) echo(' checked'); ?> id="defaultCompany" onchange="if(document.getElementById('companyName').disabled == false && document.getElementById('companyID').value > 0) {oldCompanyID = document.getElementById('companyID').value; } else if(document.getElementById('companyName').disabled == false) { oldCompanyID = 0; } document.getElementById('companyName').disabled = true; document.getElementById('companyID').value = 'defaultCompanyID); ?>'; "> Internal Posting + defaultCompanyID == $this->data['companyID']) echo(' checked'); ?> id="defaultCompany" onchange="if(document.getElementById('companyName').disabled == false && document.getElementById('companyID').value > 0) {oldCompanyID = document.getElementById('companyID').value; } else if(document.getElementById('companyName').disabled == false) { oldCompanyID = 0; } document.getElementById('companyName').disabled = true; document.getElementById('companyID').value = 'defaultCompanyID); ?>'; "> defaultCompanyRS['name']); ?>