1<?php
2// (c) Copyright by authors of the Tiki Wiki CMS Groupware Project
3//
4// All Rights Reserved. See copyright.txt for details and a complete list of authors.
5// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.
6// $Id$
7
8//this script may only be included - so its better to die if called directly.
9if (strpos($_SERVER["SCRIPT_NAME"], basename(__FILE__)) !== false) {
10	header("location: index.php");
11	exit;
12}
13
14/*
15 * filegal_manager_url: Return the URL of the filegal manager, that goes to the list of filegalleries
16 */
17function smarty_function_filegal_manager_url($params, $smarty)
18{
19	global $tikilib, $prefs;
20
21	$return = 'tiki-upload_file.php?galleryId=' . $prefs['home_file_gallery'] . '&view=browse';
22
23	if (! empty($params['area_id'])) {
24		$return .= '&filegals_manager=' . $params['area_id'];
25	}
26
27	return $return;
28}
29