Menu

#16 Download with only one parameter

open
Feature (4)
5
2012-09-14
2012-04-09
Anonymous
No

To allow the download with only one parameter, to have a even shorter url, modify index.php in www directory.
Add the following lines, below the $action ifconditions:
if(isset($_GET['i']) && (!isset($_GET['r'])))
{
$action = 'd';
}

In file lib/modules/default/files.inc.php, change line 266 to:
$finfo[0]['downloadlink']= app()->config['WWW_SERVER'].app()->config['WWW_ROOT'].'/?'.$i.'='.$finfo[0]['id'];

Discussion

Anonymous
Anonymous

Add attachments
Cancel