mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-22 10:24:14 +00:00
Add support for Club Log SCP
Add update_clublog_scp() method for fetching the Club Log SCP file. Update Lookup to merge masterscp.txt and clublog_scp.txt together when both are available.
This commit is contained in:
@@ -33,7 +33,7 @@ class Lookup extends CI_Controller {
|
||||
echo $log_calls ." ";
|
||||
}
|
||||
|
||||
|
||||
$arCalls = array();
|
||||
|
||||
// SCP results from master scp db
|
||||
$file = 'updates/masterscp.txt';
|
||||
@@ -46,10 +46,30 @@ class Lookup extends CI_Controller {
|
||||
$result = preg_grep('~' . $input . '~', $lines, 0);
|
||||
|
||||
foreach ($result as &$value) {
|
||||
echo " ".$value. " ";
|
||||
$arCalls[] = $value;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// SCP from Club Log
|
||||
$file = "updates/clublog_scp.txt";
|
||||
if (is_readable($file)) {
|
||||
|
||||
$lines = file($file, FILE_IGNORE_NEW_LINES);
|
||||
|
||||
foreach ($lines as $strCall)
|
||||
{
|
||||
if (in_array($strCall, $arCalls) == false)
|
||||
{
|
||||
$arCalls[] = $value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sort($arCalls);
|
||||
|
||||
foreach ($arCalls as $strCall)
|
||||
{
|
||||
echo " " . $strCall . " ";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user