-
Notifications
You must be signed in to change notification settings - Fork 243
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merge develop back to Master for a new release. #493
Conversation
…level checks for duplicate functions
conflicts resolved using master part, so not working code now # Conflicts: # js/lib.js # js/quickAction.js # lib/TemplateUtility.php
# Conflicts: # modules/candidates/CandidatesUI.php
Here is an overview of what got changed by this pull request: Issues
======
- Added 32
Complexity increasing per file
==============================
- js/ckeditor-manager.js 2
- lib/JobOrderStatuses.php 4
- modules/candidates/CandidatesUI.php 10
- lib/ImportableEntity.php 2
- modules/settings/SettingsUI.php 2
- lib/ZipLookup.php 3
- modules/candidates/quickAction-duplicates.js 2
- modules/import/ImportUI.php 6
- lib/ImportUtility.php 9
- lib/Candidates.php 26
- lib/CompaniesImport.php 2
- src/OpenCATS/UI/CandidateDuplicateQuickActionMenu.php 1
- src/OpenCATS/UI/QuickActionMenu.php 1
- lib/ContactsImport.php 2
- lib/CandidatesImport.php 2
Complexity decreasing per file
==============================
+ lib/JobOrders.php -3
Clones added
============
- js/emailHandler.js 2
See the complete overview on Codacy |
function placeCkEditorIn(nodeId) | ||
{ | ||
CKEDITOR.replace(nodeId, { extraPlugins: 'font' } ); | ||
CKEDITOR.on('instanceReady', function(ev) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Codacy found an issue: Strings must use doublequote. (quotes)
@@ -280,7 +288,7 @@ static function create( | |||
$siteId, | |||
$title, | |||
$type, | |||
$status = 0, | |||
$status = \JobOrderStatuses::getDefaultStatus(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Codacy found an issue: Avoid unused local variables such as '$status'.
'Closed / Canceled', | ||
'Upcoming / Lead' | ||
); | ||
private static $_defaultSharingStatuses = array('Active'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$rsTmp = $this->_db->getAllAssoc($sql); | ||
|
||
if($rsTmp || count($rsTmp) > 0){ | ||
foreach($rsTmp AS $index => $newID){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Codacy found an issue: Avoid unused local variables such as '$index'.
} | ||
} | ||
|
||
private function mergePipelines($oldCandidateID, $newCandidateID){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'Upcoming / Lead' | ||
); | ||
private static $_defaultSharingStatuses = array('Active'); | ||
private static $_defaultStatisticsStatuses = array('Active', 'OnHold', 'Full', 'Closed'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{ | ||
$activeCriterion = "AND (joborder.status IN ('Active', 'OnHold', 'Full'))"; | ||
} | ||
$activeCriterion = "AND (joborder.status IN ".JobOrderStatuses::getOpenStatusSQL().")"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Codacy found an issue: Avoid using static access to class 'JobOrderStatuses' in method 'byTitle'.
@@ -187,6 +181,7 @@ public function getSQL($selectSQL, $joinSQL, $whereSQL, $havingSQL, $orderSQL, $ | |||
PIPELINE_STATUS_SUBMITTED, | |||
PIPELINE_STATUS_INTERVIEWING, | |||
PIPELINE_STATUS_OFFERED, | |||
JobOrderStatuses::getOpenStatusSQL(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Codacy found an issue: Avoid using static access to class 'JobOrderStatuses' in method 'getSQL'.
|
||
|
||
|
||
public function mergeDuplicates($params, $rs) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -0,0 +1,21 @@ | |||
|
|||
function placeCkEditorIn(nodeId) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Codacy found an issue: 'placeCkEditorIn' is defined but never used. (no-unused-vars)
@@ -44,7 +44,7 @@ function saveListRow(rowNumber, sessionCookie) | |||
var http = AJAX_getXMLHttpObject(); | |||
|
|||
/* Build HTTP POST data. */ | |||
var POSTData = '&savedListID='+rowNumber+'&savedListName='+document.getElementById('savedListRowInput'+rowNumber).value; | |||
var POSTData = '&savedListID='+rowNumber+'&savedListName='+encodeURIComponent(document.getElementById('savedListRowInput'+rowNumber).value); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Codacy found an issue: Strings must use doublequote. (quotes)
$listIDs .= $row['listID']; | ||
$listIDs .= ", "; | ||
} | ||
$listIDs = substr($listIDs, 0, strlen($lists) - 2); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Codacy found an issue: Avoid unused local variables such as '$lists'.
} | ||
else | ||
{ | ||
getReplaceText_AJAX(candidateId, templateText, sessionCookie); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Codacy found an issue: 'getReplaceText_AJAX' was used before it was defined. (no-use-before-define)
|
||
function placeCkEditorIn(nodeId) | ||
{ | ||
CKEDITOR.replace(nodeId, { extraPlugins: 'font' } ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Codacy found an issue: Strings must use doublequote. (quotes)
@@ -314,6 +315,8 @@ public function handleRequest() | |||
*/ | |||
private function listByView($errMessage = '') | |||
{ | |||
$jobOrderFilters = JobOrderStatuses::getFilters(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Codacy found an issue: Avoid using static access to class 'JobOrderStatuses' in method 'listByView'.
$queryResult = mysql_query($sql); | ||
$totalAttachments = mysql_num_rows($queryResult); | ||
$queryResult = mysqli_query($db, $sql); | ||
$totalAttachments = mysqli_num_rows($queryResult); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Codacy found an issue: Avoid unused local variables such as '$totalAttachments'.
{ | ||
var tags = ['p', 'ol', 'ul', 'li']; // etc. | ||
|
||
for (var key in tags) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
public function __construct($siteID) | ||
{ | ||
$this->_siteID = $siteID; | ||
$this->_db = DatabaseConnection::getInstance(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Codacy found an issue: Avoid using static access to class 'DatabaseConnection' in method '__construct'.
@@ -10,7 +10,7 @@ quickAction.CandidateMenu.prototype.getOptions = function() | |||
var options = quickAction.DefaultMenu.prototype.getOptions.call(this); | |||
if(this.getPermissions().pipelines_addToPipeline) | |||
{ | |||
options.push(new quickAction.MenuOption('Add To Pipeline', 'showQuickActionAddToPipeline(' + this.getType() + ');')); | |||
options.push(new quickAction.MenuOption('Add To Job Order', 'showQuickActionAddToPipeline(' + this.getType() + ');')); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Codacy found an issue: Strings must use doublequote. (quotes)
@@ -1093,6 +1132,794 @@ public function administrativeHideShow($candidateID, $state) | |||
|
|||
return (boolean) $this->_db->query($sql); | |||
} | |||
|
|||
public function checkDuplicity($firstName, $middleName, $lastName, $email1, $email2, $phoneHome, $phoneCell, $phoneWork, $address, $city) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
||
$this->_template->display('./modules/candidates/Show.tpl'); | ||
|
||
if (!eval(Hooks::get('CANDIDATE_SHOW'))) return; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Codacy found an issue: Avoid using static access to class 'Hooks' in method 'show'.
* @param string wildcard match string | ||
* @return array candidates data | ||
*/ | ||
public function all($wildCardString, $sortBy, $sortDirection) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Codacy found an issue: Avoid unused parameters such as '$wildCardString'.
@@ -1093,6 +1132,794 @@ public function administrativeHideShow($candidateID, $state) | |||
|
|||
return (boolean) $this->_db->query($sql); | |||
} | |||
|
|||
public function checkDuplicity($firstName, $middleName, $lastName, $email1, $email2, $phoneHome, $phoneCell, $phoneWork, $address, $city) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
case JOBORDERS_STATUS_CLOSED: | ||
$statusCriterion = "AND joborder.status = 'Closed'"; | ||
case JOBORDERS_STATUS_SHARE: | ||
$statusCriterion = "AND joborder.status IN ".JobOrderStatuses::getShareStatusSQL(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Codacy found an issue: Avoid using static access to class 'JobOrderStatuses' in method 'getAll'.
|
||
|
||
|
||
public function mergeDuplicates($params, $rs) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The showTemplate() function need to be repositioned prior to getTemplateTextAJAX() to fix this issue in js/emailHandler.js
This will be the basis for a PHP 7.2 compatible release from Master.