show all playlists in the admin panel SE4 Music Plugin

Started on the old forum in October 2014 · view the original in the archive · old links redirect here

No replies · 57 views · started 12 years ago · 1 min read

GumSlone Administrator Principal · 1,690 posts #1

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:

$this->view->paginator = Engine_Api::_()->music()->getPlaylistPaginator();

its around ​line 42, and replace by:

$this->view->paginator = Engine_Api::_()->music()->getPlaylistPaginator(array('admin'=>1));

save changes.

open: /application/modules/Music/Api/Core.php find (around 87 line):

$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:

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

External image (may be gone)

Write your reply now; next you create a free account (or sign in) and it is posted right away. Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close