Version 4.1.19
This commit is contained in:
1 parent
28bd025b35
commit
2bd5025018
2674 files changed
+233518
-77766
No files matched your search
@@ -3,7 +3,7 @@
|
||||
* @brief Downloads Application Class
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2013 Invision Power Services, Inc.
|
||||
* @package IPS Social Suite
|
||||
* @package IPS Community Suite
|
||||
* @subpackage Downloads
|
||||
* @since 27 Sep 2013
|
||||
* @version
|
||||
@@ -47,4 +47,61 @@ class _Application extends \IPS\Application
|
||||
{
|
||||
return 'download';
|
||||
}
|
||||
|
||||
/**
|
||||
* Default front navigation
|
||||
*
|
||||
* @code
|
||||
|
||||
// Each item...
|
||||
array(
|
||||
'key' => 'Example', // The extension key
|
||||
'app' => 'core', // [Optional] The extension application. If ommitted, uses this application
|
||||
'config' => array(...), // [Optional] The configuration for the menu item
|
||||
'title' => 'SomeLangKey', // [Optional] If provided, the value of this language key will be copied to menu_item_X
|
||||
'children' => array(...), // [Optional] Array of child menu items for this item. Each has the same format.
|
||||
)
|
||||
|
||||
return array(
|
||||
'rootTabs' => array(), // These go in the top row
|
||||
'browseTabs' => array(), // These go under the Browse tab on a new install or when restoring the default configuraiton; or in the top row if installing the app later (when the Browse tab may not exist)
|
||||
'browseTabsEnd' => array(), // These go under the Browse tab after all other items on a new install or when restoring the default configuraiton; or in the top row if installing the app later (when the Browse tab may not exist)
|
||||
'activityTabs' => array(), // These go under the Activity tab on a new install or when restoring the default configuraiton; or in the top row if installing the app later (when the Activity tab may not exist)
|
||||
)
|
||||
* @endcode
|
||||
* @return array
|
||||
*/
|
||||
public function defaultFrontNavigation()
|
||||
{
|
||||
return array(
|
||||
'rootTabs' => array(),
|
||||
'browseTabs' => array( array( 'key' => 'Downloads' ) ),
|
||||
'browseTabsEnd' => array(),
|
||||
'activityTabs' => array()
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Perform some legacy URL parameter conversions
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function convertLegacyParameters()
|
||||
{
|
||||
if ( isset( \IPS\Request::i()->showfile ) AND is_numeric( \IPS\Request::i()->showfile ) )
|
||||
{
|
||||
try
|
||||
{
|
||||
$file = \IPS\downloads\File::loadAndCheckPerms( \IPS\Request::i()->showfile );
|
||||
|
||||
\IPS\Output::i()->redirect( $file->url() );
|
||||
}
|
||||
catch( \OutOfRangeException $e ) {}
|
||||
}
|
||||
|
||||
if ( isset( \IPS\Request::i()->module ) AND \IPS\Request::i()->module == 'post' AND isset( \IPS\Request::i()->controller ) AND \IPS\Request::i()->controller == 'submit' )
|
||||
{
|
||||
\IPS\Output::i()->redirect( \IPS\Http\Url::internal( "app=downloads&module=downloads&controller=submit", "front", "downloads_submit" ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user