------------------------------------------------------------
revno: 1146
committer: Roger Martin <[email protected]>
branch nick: aikiframework
timestamp: Fri 2012-03-16 17:24:31 +0100
message:
improving widgets canditate search
modified:
libs/widgets.php
--
lp:aikiframework
https://code.launchpad.net/~aikiframework-devel/aikiframework/trunk
Your team Aiki Framework Developers is subscribed to branch lp:aikiframework.
To unsubscribe from this branch go to
https://code.launchpad.net/~aikiframework-devel/aikiframework/trunk/+edit-subscription
=== modified file 'libs/widgets.php'
--- libs/widgets.php 2012-03-13 19:39:08 +0000
+++ libs/widgets.php 2012-03-16 16:24:31 +0000
@@ -61,10 +61,13 @@
"SELECT id, display_urls, kill_urls, widget_name, widget_target, css<>'' as have_css" .
" FROM aiki_widgets " .
" WHERE father_widget=$father AND " .
- $this->widget_scope() ." AND ".
- " (display_urls LIKE '%$search%' OR display_urls = '*' OR ".
- " display_urls LIKE '%#%#%') AND " .
- " (kill_urls='' OR kill_urls not rlike '^$search\$|^$search\\\\||\\\\|$search\$|\\\\|$search\\\\|') " .
+ $this->widget_scope() ." AND (".
+ " concat('|',display_urls,'|') LIKE '%|$search|%' OR".
+ " concat('|',display_urls) LIKE '%|$search/%' OR".
+ " concat('|',display_urls) LIKE '%|$search$%' OR".
+ " display_urls = '*' OR".
+ " display_urls LIKE '%#%#%')" .
+ " AND (kill_urls='' OR concat('|',kill_urls,'|') not like '%|$search|%') " .
" ORDER BY display_order, id";
return $db->get_results($SQL);
}
_______________________________________________
Mailing list: https://launchpad.net/~aikiframework-devel
Post to : [email protected]
Unsubscribe : https://launchpad.net/~aikiframework-devel
More help : https://help.launchpad.net/ListHelp