Added a check so that it will only use the master scp file if uploads/masterscp.txt is readable
这个提交包含在:
父节点
bf2b372b41
当前提交
ea38da1ef9
共有 1 个文件被更改,包括 8 次插入 和 5 次删除
|
|
@ -29,8 +29,9 @@ class Lookup extends CI_Controller {
|
||||||
// SCP results from master scp db
|
// SCP results from master scp db
|
||||||
$file = 'updates/masterscp.txt';
|
$file = 'updates/masterscp.txt';
|
||||||
|
|
||||||
$lines = file($file, FILE_IGNORE_NEW_LINES);
|
if (is_readable($file)) {
|
||||||
|
|
||||||
|
$lines = file($file, FILE_IGNORE_NEW_LINES);
|
||||||
$input = preg_quote($call, '~');
|
$input = preg_quote($call, '~');
|
||||||
|
|
||||||
$result = preg_grep('~' . $input . '~', $lines, 0);
|
$result = preg_grep('~' . $input . '~', $lines, 0);
|
||||||
|
|
@ -41,3 +42,5 @@ class Lookup extends CI_Controller {
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
||||||
正在加载…
在新工单中引用