Skip to content

Commit

Permalink
Develop (#473)
Browse files Browse the repository at this point in the history
* 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.
  • Loading branch information
shantadam committed Apr 15, 2020
1 parent e232aab commit 77c1f2b
Show file tree
Hide file tree
Showing 13 changed files with 47 additions and 49 deletions.
4 changes: 2 additions & 2 deletions constants.php
Expand Up @@ -41,10 +41,10 @@
);

/* CATS Version */
define('CATS_VERSION', '0.9.4 Countach');
define('CATS_VERSION', '0.9.5.2');

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

/* HTTP response codes. */
define('HTTP_OK', 200);
Expand Down
4 changes: 3 additions & 1 deletion db/upgrade-0.9.4-0.9.5.sql
Expand Up @@ -10,4 +10,6 @@ CREATE TABLE `candidate_duplicates` (
PRIMARY KEY (`old_candidate_id`, `new_candidate_id`),
KEY `IDX_old_candidate_id` (`old_candidate_id`),
KEY `IDX_new_candidate_id` (`new_candidate_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
ALTER TABLE `candidate`
MODIFY COLUMN `web_site` varchar(352);
11 changes: 7 additions & 4 deletions lib/DatabaseConnection.php
Expand Up @@ -362,11 +362,14 @@ public function getAllAssoc($query = null)

/* Make sure we always return an array. */
$recordSetArray = array();

/* Store all rows in $recordSetArray; */
while (($recordSet = mysqli_fetch_assoc($this->_queryResult)))

if($this->_queryResult)
{
$recordSetArray[] = $recordSet;
/* Store all rows in $recordSetArray; */
while (($recordSet = mysqli_fetch_assoc($this->_queryResult)))
{
$recordSetArray[] = $recordSet;
}
}

/* Return the multi-dimensional record set array. */
Expand Down
6 changes: 3 additions & 3 deletions lib/Mailer.php
Expand Up @@ -208,8 +208,8 @@ public function send($from, $recipients, $subject, $body, $isHTML = false,

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

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

$this->_mailer->isHTML(false);
Expand Down
8 changes: 4 additions & 4 deletions lib/SystemInfo.php
Expand Up @@ -58,7 +58,7 @@ public function getSystemInfo()
"SELECT
*
FROM
system
`system`
WHERE
system_id = 0"
);
Expand All @@ -76,7 +76,7 @@ public function updateUID($uid)
{
$sql = sprintf(
"UPDATE
system
`system`
SET
uid = '%s'
WHERE
Expand All @@ -96,7 +96,7 @@ public function updateVersionCheckPrefs($enableNewVersionCheck)
{
$sql = sprintf(
"UPDATE
system
`system`
SET
disable_version_check = %s
WHERE
Expand All @@ -118,7 +118,7 @@ public function updateRemoteVersion($version, $newsRelease, $date)
{
$sql = sprintf(
"UPDATE
system
`system`
SET
available_version = '%s',
available_version_description = '%s',
Expand Down
18 changes: 9 additions & 9 deletions lib/TemplateUtility.php
Expand Up @@ -813,22 +813,22 @@ public static function printFooter()
$buildString = '';
}

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

echo '<div class="footerBlock">', "\n";
echo '<p id="footerText">CATS Version ', CATS_VERSION, $buildString,
'. <span id="toolbarVersion"></span>Powered by <a href="http://www.catsone.com/"><strong>CATS</strong></a>.</p>', "\n";
echo '<p id="footerText">OpenCATS Version ', CATS_VERSION, $buildString,
'. <span id="toolbarVersion"></span>Powered by <a href="http://www.opencats.org/"><strong>OpenCATS</strong></a>.</p>', "\n";
echo '<span id="footerResponse">Server Response Time: ', $loadTime, ' seconds.</span><br />';
echo '<span id="footerCopyright">', COPYRIGHT_HTML, '</span>', "\n";
if (!eval(Hooks::get('TEMPLATEUTILITY_SHOWPRIVACYPOLICY'))) return;
Expand Down
17 changes: 6 additions & 11 deletions lib/artichow/inc/Axis.class.php
Expand Up @@ -317,11 +317,9 @@ public function getLabelNumber() {
*/
public function setLabelPrecision($precision) {
$this->auto(FALSE);
$function = 'axis'.time().'_'.(microtime(true) * 10000);
eval('function '.$function.'($value) {
return sprintf("%.'.(int)$precision.'f", $value);
}');
$this->label->setCallbackFunction($function);
$this->label->setCallbackFunction(function ($value) use ($precision) {
return sprintf('%.' . (int) $precision . 'f', $value);
});
}

/**
Expand All @@ -332,12 +330,9 @@ public function setLabelPrecision($precision) {
public function setLabelText($texts) {
if(is_array($texts)) {
$this->auto(FALSE);
$function = 'axis'.time().'_'.(microtime(true) * 10000);
eval('function '.$function.'($value) {
$texts = '.var_export($texts, TRUE).';
return $texts[$value];
}');
$this->label->setCallbackFunction($function);
$this->label->setCallbackFunction(function ($value) use ($texts) {
return isset($texts[$value]) ? $texts[$value] : '?';
});
}
}

Expand Down
10 changes: 4 additions & 6 deletions lib/artichow/inc/Label.class.php
Expand Up @@ -217,7 +217,7 @@ public function count() {
* @param string $function
*/
public function setCallbackFunction($function) {
$this->function = is_null($function) ? $function : (string)$function;
$this->function = $function;
}

/**
Expand All @@ -235,11 +235,9 @@ public function getCallbackFunction() {
* @param string $format New format (printf style: %.2f for example)
*/
public function setFormat($format) {
$function = 'label'.time().'_'.(microtime(true) * 10000);
eval('function '.$function.'($value) {
return sprintf("'.addcslashes($format, '"').'", $value);
}');
$this->setCallbackFunction($function);
$this->setCallbackFunction(function ($value) use ($format) {
return sprintf($format, $value);
});
}

/**
Expand Down
4 changes: 2 additions & 2 deletions modules/careers/Blank.tpl
Expand Up @@ -35,9 +35,9 @@
</div>
<div style="text-align:center;">

<?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. */ ?>
<?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. */ ?>
<div id="poweredCATS">
<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>
<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>
</div>
</div>
<script type="text/javascript">st_init();</script>
Expand Down
4 changes: 2 additions & 2 deletions modules/careers/Blank2.tpl
Expand Up @@ -29,8 +29,8 @@
</div>
<div style="text-align:center;">

<?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. */ ?>
<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>.
<?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. */ ?>
<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>.

</div>
<script type="text/javascript">st_init();</script>
Expand Down
4 changes: 2 additions & 2 deletions modules/careers/BlankNoMargin.tpl
Expand Up @@ -31,8 +31,8 @@
</div>
<div style="text-align:center;">

<?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. */ ?>
<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>.
<?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. */ ?>
<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.org" target="_blank">OpenCATS</a>.

</div>
<script type="text/javascript">st_init();</script>
Expand Down
2 changes: 1 addition & 1 deletion modules/login/Login.tpl
Expand Up @@ -122,7 +122,7 @@
</div>
<div id="footerBlock">
<span class="footerCopyright"><?php echo(COPYRIGHT_HTML); ?></span>
Based upon original work and Powered by <a href="http://www.catsone.com ">CATS</a>.</div>
Based upon original work and Powered by <a href="http://www.opencats.org" target="_blank">OpenCATS</a>.</div>
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions modules/reports/GraphView.tpl
Expand Up @@ -45,8 +45,8 @@
}
</script>

<p id="footerText" align="center">CATS Version <?php echo(CATSUtility::getVersion()); ?> build <?php echo(CATSUtility::getBuild()); ?>. Powered by <a href="http://www.catsone.com/"><strong>CATS</strong></a>.<br />
<span id="footerCopyright">&copy;2005 - 2007 Cognizo Technologies, Inc. All rights reserved.</span></p>
<p id="footerText" align="center">CATS Version <?php echo(CATSUtility::getVersion()); ?> build <?php echo(CATSUtility::getBuild()); ?>. Powered by <a href="http://www.opencats.org" target="_blank"><strong>OpenCATS</strong></a>.<br />
<span id="footerCopyright">&copy;2007-2020 OpenCATS All rights reserved.</span></p>
</div>
</body>
</html>

0 comments on commit 77c1f2b

Please sign in to comment.