show all playlists in the admin panel SE4 Music Plugin

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    how to show all playlists in the admin panel SE4 Music Plugin

    I found that there is a bug in the socialengine 4 music plugin, not all playlists were visible in admin panel, specially those where the site search was disabled.
    Here is a fix how to show all playlists in the admin panel:

    open: /application/modules/Music/controllers/AdminLevelController.php
    find:

    PHP Code:
    $this->view->paginator Engine_Api::_()->music()->getPlaylistPaginator(); 
    its around ​line 42,
    and replace by:
    PHP Code:
    $this->view->paginator Engine_Api::_()->music()->getPlaylistPaginator(array('admin'=>1)); 
    save changes.

    open: /application/modules/Music/Api/Core.php
    find (around 87 line):
    PHP Code:
    $select->where('1')
    // prevent empty playlists from showing
    ->joinLeft($ps_name"$p_name.playlist_id = $ps_name.playlist_id"'')
    ->
    where("$ps_name.song_id IS NOT NULL")

    and replace with:
    PHP Code:
    if( !empty($params['admin']) ) {
    $select->where('1')
    // prevent empty playlists from showing
    ->joinLeft($ps_name"$p_name.playlist_id = $ps_name.playlist_id"'')
    ->
    where("$ps_name.song_id IS NOT NULL")
    ;
    }
    else
    {
    $select->where('search = 1')
    // prevent empty playlists from showing
    ->joinLeft($ps_name"$p_name.playlist_id = $ps_name.playlist_id"'')
    ->
    where("$ps_name.song_id IS NOT NULL")
    ;

    Done!
    Advertise your mobile site for FREE with AdTwirl

Working...
X