playlist unique au compte connecté
This commit is contained in:
@@ -6,6 +6,7 @@ class Albums extends CI_Controller {
|
||||
public function __construct(){
|
||||
parent::__construct();
|
||||
$this->load->model('model_music');
|
||||
$this->load->library('session');
|
||||
}
|
||||
|
||||
public function index(){
|
||||
@@ -24,7 +25,8 @@ class Albums extends CI_Controller {
|
||||
$search = $_POST['recherche'];
|
||||
}
|
||||
}
|
||||
$playlists = $this->model_music->getPlaylist();
|
||||
$mail = $this->session->userdata('mail');
|
||||
$playlists = $this->model_music->getPlaylist($mail);
|
||||
$albums = $this->model_music->searchAlbums($search, $selectedGenre);
|
||||
$this->load->view('albums_list', ['albums' => $albums, 'playlists' => $playlists]);
|
||||
$this->load->view('layout/footer');
|
||||
@@ -38,7 +40,8 @@ class Albums extends CI_Controller {
|
||||
if (empty($songs)) {
|
||||
$songs = [];
|
||||
}
|
||||
$playlists = $this->model_music->getPlaylist();
|
||||
$mail = $this->session->userdata('mail');
|
||||
$playlists = $this->model_music->getPlaylist($mail);
|
||||
$this->load->view('layout/header');
|
||||
$this->load->view('song_album_list', ['songs' => $songs, 'playlists' => $playlists]);
|
||||
$this->load->view('layout/footer');
|
||||
|
||||
Reference in New Issue
Block a user