Commit 1b157253 authored by anon's avatar anon

by anon: Added "db_rewrite_sql" to node and taxonomy plugin

parent 56998c1b
......@@ -2,8 +2,9 @@
Linkit x.x-x.x, xxxx-xx-xx
------------------------------
Linkit 6.x-1.1, xxxx-xx-xx
Linkit 6.x-1.1, 2010-03-05
------------------------------
by anon: Added "db_rewrite_sql" to node and taxonomy plugin
by anon: Removed "linkit_tinymce.css" (it wasnt used anymore)
by anon: Fixed permissions bug
- (create all links) didnt work
......
......@@ -14,7 +14,7 @@ function linkit_node_linkit_load_plugins($string) {
$matches = array();
// Get nodes
$result = db_query_range("SELECT title, nid FROM {node} WHERE LOWER(title) LIKE LOWER('%%%s%%')", $string, 0, 10);
$result = db_query_range(db_rewrite_sql("SELECT n.title, n.nid FROM {node} n WHERE LOWER(n.title) LIKE LOWER('%%%s%%') AND n.status = 1"), $string, 0, 10);
while ($node = db_fetch_object($result)) {
$matches['node'][linkit_autolist_val($node->title, 'internal:node/' . $node->nid)] = linkit_autolist_list($node->title, 'Node');
}
......
......@@ -14,7 +14,7 @@ function linkit_taxonomy_linkit_load_plugins($string) {
$matches = array();
// Get terms
$result = db_query_range("SELECT name, tid FROM {term_data} WHERE LOWER(name) LIKE LOWER('%%%s%%')", $string, 0, 10);
$result = db_query_range(db_rewrite_sql("SELECT t.name, t.tid FROM {term_data} t WHERE LOWER(t.name) LIKE LOWER('%%%s%%')", 't', 'tid'), $string, 0, 10);
while ($term = db_fetch_object($result)) {
$matches['taxonomy'][linkit_autolist_val($term->name, 'internal:taxonomy/term/' . $term->tid)] = linkit_autolist_list($term->name, 'Taxonomy');
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment