Proyectos de Subversion Moodle

Rev

Rev 1 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1 Rev 1441
Línea 380... Línea 380...
380
        return true;
380
        return true;
381
    }
381
    }
382
}
382
}
Línea 383... Línea 383...
383
 
383
 
384
/**
-
 
385
 * Primitive function to generate a SQL string from a parse tree
-
 
386
 * using TEXT indexes. If searches aren't suitable to use TEXT
-
 
387
 * this function calls the default search_generate_SQL() one.
-
 
388
 *
-
 
389
 * @deprecated since Moodle 2.9 MDL-48939
-
 
390
 * @todo MDL-48940 This will be deleted in Moodle 3.2
-
 
391
 * @see search_generate_SQL()
-
 
392
 */
-
 
393
function search_generate_text_SQL($parsetree, $datafield, $metafield, $mainidfield, $useridfield,
-
 
394
                             $userfirstnamefield, $userlastnamefield, $timefield, $instancefield) {
-
 
395
    debugging('search_generate_text_SQL() is deprecated, please use search_generate_SQL() instead.', DEBUG_DEVELOPER);
-
 
396
 
-
 
397
    return search_generate_SQL($parsetree, $datafield, $metafield, $mainidfield, $useridfield,
-
 
398
                               $userfirstnamefield, $userlastnamefield, $timefield, $instancefield);
-
 
399
}
-
 
400
 
-
 
401
/**
384
/**
402
 * Primitive function to generate a SQL string from a parse tree.
385
 * Primitive function to generate a SQL string from a parse tree.
403
 * Parameters:
386
 * Parameters:
404
 *
387
 *
405
 * $parsetree should be a parse tree generated by a
388
 * $parsetree should be a parse tree generated by a
Línea 437... Línea 420...
437
        }
420
        }
Línea 438... Línea 421...
438
 
421
 
439
        $type = $parsetree[$i]->getType();
422
        $type = $parsetree[$i]->getType();
Línea 440... Línea 423...
440
        $value = $parsetree[$i]->getValue();
423
        $value = $parsetree[$i]->getValue();
441
 
424
 
442
    /// Under Oracle and MSSQL, transform TOKEN searches into STRING searches and trim +- chars
425
        // Under MSSQL, transform TOKEN searches into STRING searches and trim +- chars.
443
        if (!$DB->sql_regex_supported()) {
426
        if (!$DB->sql_regex_supported()) {
444
            $value = trim($value, '+-');
427
            $value = trim($value, '+-');
445
            if ($type == TOKEN_EXACT) {
428
            if ($type == TOKEN_EXACT) {