Namespaces | Functions

cms/download.lib.php File Reference

Go to the source code of this file.

Namespaces

namespace  pragyan
 

Widget Framework for Pragyan CMS (c) 2010 Pragyan Team http://www.gnu.org/licenses/ GNU Public License For more details, see README Add support for File Upload/Download via the widget's configurations Reload Widgets ,Get Widget Instances. see bottom.


Functions

 download ($pageId, $userId, $fileName, $action="")

Function Documentation

download ( pageId,
userId,
fileName,
action = "" 
)

Gets the file that has been requested by mapping it to the proper location

Parameters:
$pageId The page where the file is present in
$userId The user who has requested the file.
$fileName The name of the file that is required.
Returns:
mixed: nothing if there is an error and the file otherwise.

If page not found display error

Not checking if filetype adheres to uploadable filetype list beacuse this check can be performed in $moduleInstance->getFileAccessPermission.

Definition at line 27 of file download.lib.php.