Addresses MDL-18638 (Search code does not follow coding guidelines) and MDL-18474 (global search should use of PATH_SEPARATOR)
This commit is contained in:
@@ -117,8 +117,8 @@ function data_get_records($database_id, $typematch = '*') {
|
||||
SELECT
|
||||
c.*
|
||||
FROM
|
||||
{$CFG->prefix}data_content as c,
|
||||
{$CFG->prefix}data_records as r
|
||||
{$CFG->prefix}data_content c,
|
||||
{$CFG->prefix}data_records r
|
||||
WHERE
|
||||
c.recordid = r.id AND
|
||||
r.dataid = {$database_id}
|
||||
@@ -161,8 +161,8 @@ function data_get_comments($database_id) {
|
||||
c.modified,
|
||||
r.dataid
|
||||
FROM
|
||||
{$CFG->prefix}data_comments as c,
|
||||
{$CFG->prefix}data_records as r
|
||||
{$CFG->prefix}data_comments c,
|
||||
{$CFG->prefix}data_records r
|
||||
WHERE
|
||||
c.recordid = r.id
|
||||
";
|
||||
|
||||
@@ -88,7 +88,7 @@ function resource_get_content_for_index(&$notneeded) {
|
||||
id as trueid,
|
||||
r.*
|
||||
FROM
|
||||
{$CFG->prefix}resource as r
|
||||
{$CFG->prefix}resource r
|
||||
WHERE
|
||||
alltext != '' AND
|
||||
alltext != ' ' AND
|
||||
@@ -125,9 +125,9 @@ function resource_get_content_for_index(&$notneeded) {
|
||||
r.type as type,
|
||||
r.timemodified as timemodified
|
||||
FROM
|
||||
{$CFG->prefix}resource as r,
|
||||
{$CFG->prefix}course_modules as cm,
|
||||
{$CFG->prefix}modules as m
|
||||
{$CFG->prefix}resource r,
|
||||
{$CFG->prefix}course_modules cm,
|
||||
{$CFG->prefix}modules m
|
||||
WHERE
|
||||
r.type = 'file' AND
|
||||
cm.instance = r.id AND
|
||||
@@ -235,9 +235,9 @@ function resource_single_document($id, $itemtype) {
|
||||
r.type as type,
|
||||
r.timemodified as timemodified
|
||||
FROM
|
||||
{$CFG->prefix}resource as r,
|
||||
{$CFG->prefix}course_modules as cm,
|
||||
{$CFG->prefix}modules as m
|
||||
{$CFG->prefix}resource r,
|
||||
{$CFG->prefix}course_modules cm,
|
||||
{$CFG->prefix}modules m
|
||||
WHERE
|
||||
cm.instance = r.id AND
|
||||
cm.course = r.course AND
|
||||
|
||||
Reference in New Issue
Block a user