mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-22 10:24:14 +00:00
Added a check so that it will only use the master scp file if uploads/masterscp.txt is readable
This commit is contained in:
@@ -29,15 +29,18 @@ class Lookup extends CI_Controller {
|
||||
// SCP results from master scp db
|
||||
$file = 'updates/masterscp.txt';
|
||||
|
||||
$lines = file($file, FILE_IGNORE_NEW_LINES);
|
||||
if (is_readable($file)) {
|
||||
|
||||
$input = preg_quote($call, '~');
|
||||
$lines = file($file, FILE_IGNORE_NEW_LINES);
|
||||
$input = preg_quote($call, '~');
|
||||
|
||||
$result = preg_grep('~' . $input . '~', $lines, 0);
|
||||
$result = preg_grep('~' . $input . '~', $lines, 0);
|
||||
|
||||
foreach ($result as &$value) {
|
||||
echo " ".$value. " ";
|
||||
foreach ($result as &$value) {
|
||||
echo " ".$value. " ";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user