Minor changes (variable naming and comments)
这个提交包含在:
父节点
5597927c64
当前提交
a4a9217e37
共有 2 个文件被更改,包括 3 次插入 和 3 次删除
|
|
@ -294,13 +294,13 @@ class QSO extends CI_Controller {
|
||||||
|
|
||||||
if(!empty($this->input->get("query"))) {
|
if(!empty($this->input->get("query"))) {
|
||||||
$query = isset($_GET['query']) ? $_GET['query'] : FALSE;
|
$query = isset($_GET['query']) ? $_GET['query'] : FALSE;
|
||||||
$sota = strtoupper($query);
|
$dok = strtoupper($query);
|
||||||
|
|
||||||
$file = 'assets/json/dok.txt';
|
$file = 'assets/json/dok.txt';
|
||||||
|
|
||||||
if (is_readable($file)) {
|
if (is_readable($file)) {
|
||||||
$lines = file($file, FILE_IGNORE_NEW_LINES);
|
$lines = file($file, FILE_IGNORE_NEW_LINES);
|
||||||
$input = preg_quote($sota, '~');
|
$input = preg_quote($dok, '~');
|
||||||
$reg = '~^'. $input .'(.*)$~';
|
$reg = '~^'. $input .'(.*)$~';
|
||||||
$result = preg_grep($reg, $lines);
|
$result = preg_grep($reg, $lines);
|
||||||
$json = [];
|
$json = [];
|
||||||
|
|
|
||||||
|
|
@ -404,7 +404,7 @@ $( document ).ready(function() {
|
||||||
options: [],
|
options: [],
|
||||||
create: false,
|
create: false,
|
||||||
load: function(query, callback) {
|
load: function(query, callback) {
|
||||||
if (!query) return callback(); // Only trigger if 3 or more characters are entered
|
if (!query) return callback(); // Only trigger if at least 1 character is entered
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: baseURL+'index.php/qso/get_dok',
|
url: baseURL+'index.php/qso/get_dok',
|
||||||
type: 'GET',
|
type: 'GET',
|
||||||
|
|
|
||||||
正在加载…
在新工单中引用