Version 4.7.6
This commit is contained in:
1 parent
8ba7d43898
commit
7b7404e741
1085 files changed
+30590
-7837
No files matched your search
@@ -99,6 +99,7 @@ class _categories extends \IPS\Node\Controller
|
||||
|
||||
$class = $this->nodeClass;
|
||||
\IPS\Task::queue( 'core', 'ResyncTopicContent', array( 'class' => $class, 'categoryId' => \IPS\Request::i()->id ), 3, array( 'categoryId' ) );
|
||||
\IPS\Session::i()->log( 'acplogs__downloads_resync_topics', array( $class::$titleLangPrefix . \IPS\Request::i()->id => TRUE ) );
|
||||
\IPS\Output::i()->redirect( \IPS\Http\Url::internal( 'app=downloads&module=downloads&controller=categories&do=form&id=' . \IPS\Request::i()->id ), \IPS\Member::loggedIn()->language()->addToStack('rebuilding_stuff', FALSE, array( 'sprintf' => array( \IPS\Member::loggedIn()->language()->addToStack( 'category_forums_integration' ) ) ) ) );
|
||||
}
|
||||
}
|
||||
@@ -234,6 +234,9 @@ class _browse extends \IPS\Dispatcher\Controller
|
||||
$permissions = $category->permissions();
|
||||
\IPS\Session::i()->setLocation( $category->url(), explode( ",", $permissions['perm_view'] ), 'loc_downloads_viewing_category', array( "downloads_category_{$category->id}" => TRUE ) );
|
||||
|
||||
/* Set default search option */
|
||||
\IPS\Output::i()->defaultSearchOption = array( 'downloads_file', "downloads_file_pl" );
|
||||
|
||||
/* Output */
|
||||
\IPS\Output::i()->title = $category->_title;
|
||||
\IPS\Output::i()->contextualSearchOptions[ \IPS\Member::loggedIn()->language()->addToStack( 'search_contextual_item_downloads_categories' ) ] = array( 'type' => 'downloads_file', 'nodes' => $category->_id );
|
||||
|
||||
@@ -128,9 +128,17 @@ class _pending extends \IPS\Content\Controller
|
||||
}
|
||||
|
||||
/* If it's an AWS file just redirect to it */
|
||||
if ( $signedUrl = $file->generateTemporaryDownloadUrl() )
|
||||
try
|
||||
{
|
||||
\IPS\Output::i()->redirect( $signedUrl );
|
||||
if ( $signedUrl = $file->generateTemporaryDownloadUrl() )
|
||||
{
|
||||
\IPS\Output::i()->redirect( $signedUrl );
|
||||
}
|
||||
}
|
||||
catch( \UnexpectedValueException $e )
|
||||
{
|
||||
\IPS\Log::log( $e, 'downloads' );
|
||||
\IPS\Output::i()->error( 'generic_error', '3D417/5', 500, '' );
|
||||
}
|
||||
|
||||
/* Send headers and print file */
|
||||
|
||||
@@ -258,6 +258,9 @@ class _view extends \IPS\Content\Controller
|
||||
);
|
||||
}
|
||||
|
||||
/* Set default search option */
|
||||
\IPS\Output::i()->defaultSearchOption = array( 'downloads_file', "downloads_file_pl" );
|
||||
|
||||
/* Display */
|
||||
\IPS\Output::i()->sidebar['sticky'] = TRUE;
|
||||
\IPS\Output::i()->output = \IPS\Theme::i()->getTemplate( 'view' )->view( $this->file, $commentsAndReviews, $versionData, $previousVersions, $this->file->nextItem(), $this->file->prevItem(), $cfields );
|
||||
@@ -624,9 +627,17 @@ class _view extends \IPS\Content\Controller
|
||||
} );
|
||||
|
||||
/* If it's an AWS file just redirect to it */
|
||||
if ( $signedUrl = $file->generateTemporaryDownloadUrl() )
|
||||
try
|
||||
{
|
||||
\IPS\Output::i()->redirect( $signedUrl );
|
||||
if ( $signedUrl = $file->generateTemporaryDownloadUrl() )
|
||||
{
|
||||
\IPS\Output::i()->redirect( $signedUrl );
|
||||
}
|
||||
}
|
||||
catch( \UnexpectedValueException $e )
|
||||
{
|
||||
\IPS\Log::log( $e, 'downloads' );
|
||||
\IPS\Output::i()->error( 'generic_error', '3D161/M', 500, '' );
|
||||
}
|
||||
|
||||
/* Print the file, honoring ranges */
|
||||
@@ -1023,7 +1034,7 @@ class _view extends \IPS\Content\Controller
|
||||
}
|
||||
|
||||
/* Filters */
|
||||
$imageUploads = isset( $values['files'] ) ? $values['files'] : [];
|
||||
$imageUploads = isset( $values['files'] ) ? ( \is_array( $values['files'] ) ? $values['files'] : [ $values['files'] ] ) : [];
|
||||
if ( isset( $values['screenshots'] ) )
|
||||
{
|
||||
$imageUploads = array_merge( $imageUploads, $values['screenshots'] );
|
||||
|
||||
Reference in new issue
Block a user