Skip to content

Commit 77c1f2b

Browse files
author
Shant Adam
authored
Develop (#473)
* Resolved issue #444 - rss is not valid - Further analyzing the project source code for the use of getRSSDate(), it is confirmed that the call should be made statically, as CATSUtility::getAbsoluteURI() is done. - To resolve the issue we needed to correct the function’s signature declaration in OpenCATS/lib/DateUtility.php, as such: - Added the “static” property at the beginning of the function signature line 350, as such: - static public function getRSSDate($unixTime = false) * Resolve issue with missing class reference to JobOrderStatuses which is used on line 1028 of Search.php as JobOrderStatuses::getOpenStatusSQL(). * Resolved an issue with MySQL fetch command failing due to empty record set. Safeguarding MySQL function call. * Resolved an issue with SQL logic failing to safe keyword 'system'. Safeguarded by wrapping the keyword 'system' with backtick marks. * Resolved issue with limited character space for site source URL that may contain long query strings. * Updated OpenCATS version * Resolved outdated artichow library related functional issues. * Changed the organization's UI visible copyright statement to show OpenCAT.
1 parent e232aab commit 77c1f2b

13 files changed

Lines changed: 47 additions & 49 deletions

constants.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,10 @@
4141
);
4242

4343
/* CATS Version */
44-
define('CATS_VERSION', '0.9.4 Countach');
44+
define('CATS_VERSION', '0.9.5.2');
4545

4646
/* Copyright information at bottom of pages. */
47-
define('COPYRIGHT_HTML', '© 2005 - 2007 Cognizo Technologies, Inc.');
47+
define('COPYRIGHT_HTML', '© 2007-2020 OpenCATS.');
4848

4949
/* HTTP response codes. */
5050
define('HTTP_OK', 200);

db/upgrade-0.9.4-0.9.5.sql

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,6 @@ CREATE TABLE `candidate_duplicates` (
1010
PRIMARY KEY (`old_candidate_id`, `new_candidate_id`),
1111
KEY `IDX_old_candidate_id` (`old_candidate_id`),
1212
KEY `IDX_new_candidate_id` (`new_candidate_id`)
13-
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
13+
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
14+
ALTER TABLE `candidate`
15+
MODIFY COLUMN `web_site` varchar(352);

lib/DatabaseConnection.php

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -362,11 +362,14 @@ public function getAllAssoc($query = null)
362362

363363
/* Make sure we always return an array. */
364364
$recordSetArray = array();
365-
366-
/* Store all rows in $recordSetArray; */
367-
while (($recordSet = mysqli_fetch_assoc($this->_queryResult)))
365+
366+
if($this->_queryResult)
368367
{
369-
$recordSetArray[] = $recordSet;
368+
/* Store all rows in $recordSetArray; */
369+
while (($recordSet = mysqli_fetch_assoc($this->_queryResult)))
370+
{
371+
$recordSetArray[] = $recordSet;
372+
}
370373
}
371374

372375
/* Return the multi-dimensional record set array. */

lib/Mailer.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -208,8 +208,8 @@ public function send($from, $recipients, $subject, $body, $isHTML = false,
208208

209209
if ($signature)
210210
{
211-
$body .= "\n<br />\n<br /><span style=\"font-size: 10pt;\">Powered by <a href=\"http://www.catsone.com\" alt=\"CATS "
212-
. "Applicant Tracking System\">CATS</a> (Free ATS)</span>";
211+
$body .= "\n<br />\n<br /><span style=\"font-size: 10pt;\">Powered by <a href=\"http://www.opencats.org" alt=\"OpenCATS "
212+
. "Applicant Tracking System\">OpenCATS</a> (Free ATS)</span>";
213213
}
214214

215215
$this->_mailer->Body = '<div style="font: normal normal 12px Arial, Tahoma, sans-serif">'
@@ -221,7 +221,7 @@ public function send($from, $recipients, $subject, $body, $isHTML = false,
221221
{
222222
if ($signature)
223223
{
224-
$body .= "\n\nPowered by CATS (http://www.catsone.com) Free ATS";
224+
$body .= "\n\nPowered by OpenCATS (http://www.opencats.org) Free ATS";
225225
}
226226

227227
$this->_mailer->isHTML(false);

lib/SystemInfo.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public function getSystemInfo()
5858
"SELECT
5959
*
6060
FROM
61-
system
61+
`system`
6262
WHERE
6363
system_id = 0"
6464
);
@@ -76,7 +76,7 @@ public function updateUID($uid)
7676
{
7777
$sql = sprintf(
7878
"UPDATE
79-
system
79+
`system`
8080
SET
8181
uid = '%s'
8282
WHERE
@@ -96,7 +96,7 @@ public function updateVersionCheckPrefs($enableNewVersionCheck)
9696
{
9797
$sql = sprintf(
9898
"UPDATE
99-
system
99+
`system`
100100
SET
101101
disable_version_check = %s
102102
WHERE
@@ -118,7 +118,7 @@ public function updateRemoteVersion($version, $newsRelease, $date)
118118
{
119119
$sql = sprintf(
120120
"UPDATE
121-
system
121+
`system`
122122
SET
123123
available_version = '%s',
124124
available_version_description = '%s',

lib/TemplateUtility.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -813,22 +813,22 @@ public static function printFooter()
813813
$buildString = '';
814814
}
815815

816-
/* THE MODIFICATION OF THE COPYRIGHT AND 'Powered by CATS' LINES IS NOT ALLOWED
817-
BY THE TERMS OF THE CPL FOR CATS OPEN SOURCE EDITION.
816+
/* THE MODIFICATION OF THE COPYRIGHT AND 'Powered by OpenCATS' LINES IS NOT ALLOWED
817+
BY THE TERMS OF THE CPL FOR OpenCATS OPEN SOURCE EDITION.
818818
819819
II) The following copyright notice must be retained and clearly legible
820-
at the bottom of every rendered HTML document: Copyright (C) 2005 - 2007
821-
Cognizo Technologies, Inc. All rights reserved.
820+
at the bottom of every rendered HTML document: Copyright (C) 2007-2020
821+
OpenCATs All rights reserved.
822822
823-
III) The "Powered by CATS" text or logo must be retained and clearly
823+
III) The "Powered by OpenCATS" text or logo must be retained and clearly
824824
legible on every rendered HTML document. The logo, or the text
825-
"CATS", must be a hyperlink to the CATS Project website, currently
826-
http://www.catsone.com/.
825+
"OpenCATS", must be a hyperlink to the CATS Project website, currently
826+
http://www.opencats.org/.
827827
*/
828828

829829
echo '<div class="footerBlock">', "\n";
830-
echo '<p id="footerText">CATS Version ', CATS_VERSION, $buildString,
831-
'. <span id="toolbarVersion"></span>Powered by <a href="http://www.catsone.com/"><strong>CATS</strong></a>.</p>', "\n";
830+
echo '<p id="footerText">OpenCATS Version ', CATS_VERSION, $buildString,
831+
'. <span id="toolbarVersion"></span>Powered by <a href="http://www.opencats.org/"><strong>OpenCATS</strong></a>.</p>', "\n";
832832
echo '<span id="footerResponse">Server Response Time: ', $loadTime, ' seconds.</span><br />';
833833
echo '<span id="footerCopyright">', COPYRIGHT_HTML, '</span>', "\n";
834834
if (!eval(Hooks::get('TEMPLATEUTILITY_SHOWPRIVACYPOLICY'))) return;

lib/artichow/inc/Axis.class.php

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -317,11 +317,9 @@ public function getLabelNumber() {
317317
*/
318318
public function setLabelPrecision($precision) {
319319
$this->auto(FALSE);
320-
$function = 'axis'.time().'_'.(microtime(true) * 10000);
321-
eval('function '.$function.'($value) {
322-
return sprintf("%.'.(int)$precision.'f", $value);
323-
}');
324-
$this->label->setCallbackFunction($function);
320+
$this->label->setCallbackFunction(function ($value) use ($precision) {
321+
return sprintf('%.' . (int) $precision . 'f', $value);
322+
});
325323
}
326324

327325
/**
@@ -332,12 +330,9 @@ public function setLabelPrecision($precision) {
332330
public function setLabelText($texts) {
333331
if(is_array($texts)) {
334332
$this->auto(FALSE);
335-
$function = 'axis'.time().'_'.(microtime(true) * 10000);
336-
eval('function '.$function.'($value) {
337-
$texts = '.var_export($texts, TRUE).';
338-
return $texts[$value];
339-
}');
340-
$this->label->setCallbackFunction($function);
333+
$this->label->setCallbackFunction(function ($value) use ($texts) {
334+
return isset($texts[$value]) ? $texts[$value] : '?';
335+
});
341336
}
342337
}
343338

lib/artichow/inc/Label.class.php

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ public function count() {
217217
* @param string $function
218218
*/
219219
public function setCallbackFunction($function) {
220-
$this->function = is_null($function) ? $function : (string)$function;
220+
$this->function = $function;
221221
}
222222

223223
/**
@@ -235,11 +235,9 @@ public function getCallbackFunction() {
235235
* @param string $format New format (printf style: %.2f for example)
236236
*/
237237
public function setFormat($format) {
238-
$function = 'label'.time().'_'.(microtime(true) * 10000);
239-
eval('function '.$function.'($value) {
240-
return sprintf("'.addcslashes($format, '"').'", $value);
241-
}');
242-
$this->setCallbackFunction($function);
238+
$this->setCallbackFunction(function ($value) use ($format) {
239+
return sprintf($format, $value);
240+
});
243241
}
244242

245243
/**

modules/careers/Blank.tpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@
3535
</div>
3636
<div style="text-align:center;">
3737

38-
<?php /* WARNING: It is against the terms of the CPL to remove or alter the following line. The 'Powered by CATS' line must stay visible on every page. */ ?>
38+
<?php /* WARNING: It is against the terms of the CPL to remove or alter the following line. The 'Powered by OpenCATS' line must stay visible on every page. */ ?>
3939
<div id="poweredCATS">
40-
<a href="http://www.catsone.com" target="_blank"><img src="../images/CATS-powered.gif" alt="Powered by: CATS - Applicant Tracking System" title="Powered by: CATS - Applicant Tracking System" /></a>
40+
<a href="http://www.opencats.org" target="_blank"><img src="../images/CATS-powered.gif" alt="Powered by: OpenCATS - Applicant Tracking System" title="Powered by: OpenCATS - Applicant Tracking System" /></a>
4141
</div>
4242
</div>
4343
<script type="text/javascript">st_init();</script>

modules/careers/Blank2.tpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@
2929
</div>
3030
<div style="text-align:center;">
3131

32-
<?php /* WARNING: It is against the terms of the CPL to remove or alter the following line. The 'Powered by CATS' line must stay visible on every page. */ ?>
33-
<span style="font-size: 9px;">Powered by</span> <a style="color: #888; position: relative; font-size: 9px; font-weight: normal; text-align: center; left: 0px; top: 0px;" href="http://www.catsone.com/" target="_blank">CATS</a>.
32+
<?php /* WARNING: It is against the terms of the CPL to remove or alter the following line. The 'Powered by OpenCATS' line must stay visible on every page. */ ?>
33+
<span style="font-size: 9px;">Powered by</span> <a style="color: #888; position: relative; font-size: 9px; font-weight: normal; text-align: center; left: 0px; top: 0px;" href="http://www.opencats.com" target="_blank">OpenCATS</a>.
3434

3535
</div>
3636
<script type="text/javascript">st_init();</script>

0 commit comments

Comments
 (0)