/[drupal]/contributions/modules/station/playlist/station_playlist.module
ViewVC logotype

Diff of /contributions/modules/station/playlist/station_playlist.module

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.14.2.1, Wed Apr 22 18:55:35 2009 UTC revision 1.14.2.2, Sun Sep 27 07:23:58 2009 UTC
# Line 1  Line 1 
1  <?php  <?php
2    
3  define('STATION_PLAYLIST_CVS_ID', '$Id: station_playlist.module,v 1.14 2008/05/26 21:28:34 drewish Exp $');  define('STATION_PLAYLIST_CVS_ID', '$Id: station_playlist.module,v 1.14.2.1 2009/04/22 18:55:35 drewish Exp $');
4    
5  if (module_exists('views')) {  if (module_exists('views')) {
6    require_once(drupal_get_path('module', 'station_playlist') .'/views.inc');    require_once(drupal_get_path('module', 'station_playlist') .'/views.inc');
# Line 534  function station_playlist_nodeapi(&$node Line 534  function station_playlist_nodeapi(&$node
534   */   */
535  function station_playlist_autocomplete($field = '', $string = '') {  function station_playlist_autocomplete($field = '', $string = '') {
536    $matches = array();    $matches = array();
537    if (in_array($field, array('artist', 'title', 'album', 'label'))) {    if (in_array($field, array('artist', 'album', 'label'))) {
538      $result = db_query_range('SELECT DISTINCT %s AS val FROM {station_playlist_track} WHERE LOWER(%s) LIKE LOWER("%s%%") ORDER BY val', $field, $field, $string, 0, 10);      $result = db_query_range('SELECT DISTINCT %s AS val FROM {station_playlist_track} WHERE LOWER(%s) LIKE LOWER("%s%%") ORDER BY val', $field, $field, $string, 0, 10);
539      while ($item = db_fetch_object($result)) {      while ($item = db_fetch_object($result)) {
540        $matches[$item->val] = check_plain($item->val);        $matches[$item->val] = check_plain($item->val);

Legend:
Removed from v.1.14.2.1  
changed lines
  Added in v.1.14.2.2

  ViewVC Help
Powered by ViewVC 1.1.2