From f891b69aecb856cf4168306a77b1ec9b20934d94 Mon Sep 17 00:00:00 2001 From: diml Date: Mon, 23 Mar 2009 21:54:42 +0000 Subject: [PATCH] Addresses MDL-18638 (Search code does not follow coding guidelines) and MDL-18474 (global search should use of PATH_SEPARATOR) --- search/documents/data_document.php | 8 ++++---- search/documents/resource_document.php | 14 +++++++------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/search/documents/data_document.php b/search/documents/data_document.php index 21b0682a41a..065c8c544d0 100644 --- a/search/documents/data_document.php +++ b/search/documents/data_document.php @@ -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 "; diff --git a/search/documents/resource_document.php b/search/documents/resource_document.php index 4a38d6fc0e6..3b141938ec2 100644 --- a/search/documents/resource_document.php +++ b/search/documents/resource_document.php @@ -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