|
@@ 66-75 (lines=10) @@
|
| 63 |
|
if ($type == "2") { $searchtype = "( definition LIKE '%$query%' )"; } |
| 64 |
|
if ($type == "3") { $searchtype = "(( term LIKE '%$query%' OR definition LIKE '%$query%' OR ref LIKE '%$query%' ))"; } |
| 65 |
|
|
| 66 |
|
if ($xoopsModuleConfig['multicats'] == 1) { |
| 67 |
|
// If the search is in a particular category |
| 68 |
|
if ($categoryID > 0 ) { |
| 69 |
|
$andcatid = "AND categoryID = '$categoryID' "; |
| 70 |
|
} else { |
| 71 |
|
$andcatid = ""; |
| 72 |
|
} |
| 73 |
|
} else { |
| 74 |
|
$andcatid = ""; |
| 75 |
|
} |
| 76 |
|
|
| 77 |
|
// Counter |
| 78 |
|
$publishedwords = lx_countWords(); |
|
@@ 119-128 (lines=10) @@
|
| 116 |
|
} |
| 117 |
|
|
| 118 |
|
// How many results will we show in this page? |
| 119 |
|
if ($xoopsModuleConfig['multicats'] == 1) { |
| 120 |
|
// If the search is in a particular category |
| 121 |
|
if ($categoryID > 0 ) { |
| 122 |
|
$andcatid2 = "AND w.categoryID = '$categoryID' "; |
| 123 |
|
} else { |
| 124 |
|
$andcatid2 = ""; |
| 125 |
|
} |
| 126 |
|
} else { |
| 127 |
|
$andcatid2 = ""; |
| 128 |
|
} |
| 129 |
|
$catsallow = " w.categoryID IN ($catids) "; |
| 130 |
|
$queryA = "SELECT w.entryID, w.categoryID, w.term, w.init, w.definition, w.datesub, w.ref, c.name AS catname FROM ".$xoopsDB -> prefix( 'lxentries' )." w LEFT JOIN ".$xoopsDB -> prefix( 'lxcategories' )." c ON w.categoryID = c.categoryID WHERE w.offline = '0' AND ".$catsallow." ".$andcatid2." AND ".$searchtype." "; |
| 131 |
|
$queryA .= " ORDER BY w.term ASC"; |