PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » HTTP » HTTP_Upload » Bug #2487

add a getValidExtensions() or appendValidExtension()

Details

Request #2487add a getValidExtensions() or appendValidExtension()
Submitted2004-10-10 03:30 UTC
Frommatte at silent-e dot com
Assignedashnazg
StatusClosed
PackageHTTP_Upload
PHP VersionIrrelevant
OSIrrelevant
Roadmaps(Not assigned)

Comments

[2004-10-10 03:30 UTC] matte at silent-e dot com

Description:
------------
I'd like to see a way to either retrieve the current valid extensions or append to the list of extensions. Code to retrieve is below. Simple enough addition. This code could be enhanced to return an array of both the extensions and the mode but for simplicity I've started with this.

Reproduce code:
---------------
/**
* Function to retrieve the current valid extensions
*
* @access public
* @return array an array of extensions
*/
function getValidExtensions()
{
return $this->_extensions_check;
}

Expected result:
----------------
if the append version isn't implemented it's easy enough to simply...

$upload->setValidExtensions(array_merge($upload->getValidExtensions(), array('scr', 'pif')));

of course it would probably be good to fix the setValidExtensions() function to remove any duplicates that might appear.