cvs: pear /MP3_Playlist/MP3 Playlist.php

From: Date: Sun, 03 Sep 2006 06:30:13 +0000
Subject: cvs: pear /MP3_Playlist/MP3 Playlist.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-41966@lists.php.net to get a copy of this message
firman Sun Sep 3 06:30:13 2006 UTC Modified files: /pear/MP3_Playlist/MP3 Playlist.php Log: * Fix bug #8369 Send does not take care of filename parameter * Removes $fileName properties * Add $filename parameter on send() and save() http://cvs.php.net/viewvc.cgi/pear/MP3_Playlist/MP3/Playlist.php?r1=1.1&r2=1.2&diff_format=u Index: pear/MP3_Playlist/MP3/Playlist.php diff -u pear/MP3_Playlist/MP3/Playlist.php:1.1 pear/MP3_Playlist/MP3/Playlist.php:1.2 --- pear/MP3_Playlist/MP3/Playlist.php:1.1 Sun Oct 2 17:38:56 2005 +++ pear/MP3_Playlist/MP3/Playlist.php Sun Sep 3 06:30:12 2006 @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2004-2005 David Costa * @license http://www.php.net/license/3_0.txt * The PHP License, version 3.0 - * @version CVS: $Id: Playlist.php,v 1.1 2005/10/02 17:38:56 firman Exp $ + * @version CVS: $Id: Playlist.php,v 1.2 2006/09/03 06:30:12 firman Exp $ */ // }}} @@ -146,12 +146,6 @@ // {{{ Object Variables /** - * Name of the playlist. suffix is added automatically as per method used - * @var string - */ - public $fileName = 'playlist'; - - /** * Debug value * @var string */ @@ -538,17 +532,20 @@ /** * Save the generated playlist into file. * + * @param string $filename (optional) A filename for save + * (without file extension). + * * @throws PEAR_Exception * @return bool TRUE * @see MP3_Playlist_Common::save() */ - public function save() + public function save($filename = 'playlist') { if (!is_object($this->playlist) || !is_a($this->playlist, 'MP3_Playlist_Common')) { throw new PEAR_Exception(self::E_INVALID_PLAYLIST); } - return $this->playlist->save($this->outputDirectory, $this->fileName); + return $this->playlist->save($this->outputDirectory, $filename); } // }}} @@ -557,17 +554,20 @@ /** * Send the generated playlist to browser directly. * + * @param string $filename (optional) A filename for send + * (without file extension). + * * @throws PEAR_Exception * @return bool TRUE * @see MP3_Playlist_Common::send() */ - public function send() + public function send($filename = 'playlist') { if (!is_object($this->playlist) || !is_a($this->playlist, 'MP3_Playlist_Common')) { throw new PEAR_Exception(self::E_INVALID_PLAYLIST); } - return $this->playlist->send($this->fileName); + return $this->playlist->send($filename); } // }}}

« previous php.pear.cvs (#41966) next »