Version 4.0.13.1
This commit is contained in:
1 parent
f9e857d255
commit
c6a86f0d9b
7517 files changed
+597400
-668041
No files matched your search
@@ -0,0 +1,307 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief [Front] Page Controller
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Social Suite
|
||||
* @since 25 Feb 2014
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
|
||||
namespace IPS\cms\modules\front\pages;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* page
|
||||
*/
|
||||
class _builder extends \IPS\core\modules\front\system\widgets
|
||||
{
|
||||
/**
|
||||
* Preview a block (from the ACP or elsewhere dynamically)
|
||||
*
|
||||
* @return html
|
||||
*/
|
||||
public function previewBlock()
|
||||
{
|
||||
$output = "";
|
||||
|
||||
if ( isset( \IPS\Request::i()->block_plugin ) )
|
||||
{
|
||||
$block = new \IPS\cms\Blocks\Block;
|
||||
$block->type = "plugin";
|
||||
$block->plugin = \IPS\Request::i()->block_plugin;
|
||||
$block->plugin_app = ( isset( \IPS\Request::i()->block_plugin_app ) ) ? \IPS\Request::i()->block_plugin_app : \IPS\Request::i()->block_app;
|
||||
$block->plugin_plugin = \IPS\Request::i()->block_plugin_plugin;
|
||||
$block->key = md5( uniqid() );
|
||||
|
||||
$params = array();
|
||||
$block->content = NULL;
|
||||
|
||||
if ( isset( \IPS\Request::i()->_sending ) )
|
||||
{
|
||||
foreach( explode( ",", \IPS\Request::i()->_sending ) as $field )
|
||||
{
|
||||
if ( $field and isset( \IPS\Request::i()->$field ) )
|
||||
{
|
||||
if ( $field == 'block_content' )
|
||||
{
|
||||
$block->content = \IPS\Request::i()->$field;
|
||||
|
||||
if ( isset( \IPS\Request::i()->template_params ) )
|
||||
{
|
||||
$block->template_params = \IPS\Request::i()->template_params;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
$params[ $field ] = \IPS\Request::i()->$field;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$block->plugin_config = json_encode( $params );
|
||||
|
||||
/* Template stuffs */
|
||||
if ( \IPS\Request::i()->block_template_use_how == 'copy' )
|
||||
{
|
||||
$block->widget()->template( array( $block, 'getTemplate' ) );
|
||||
}
|
||||
|
||||
$output = $block->widget()->render();
|
||||
}
|
||||
|
||||
\IPS\Output::i()->sendOutput( \IPS\Theme::i()->getTemplate( 'global', 'core' )->blankTemplate( $output ), 200, 'text/html', \IPS\Output::i()->httpHeaders );
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Output For Adding A New Block
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function getBlock()
|
||||
{
|
||||
$key = $block = explode( "_", \IPS\Request::i()->blockID );
|
||||
|
||||
if ( isset( \IPS\Request::i()->pageID ) )
|
||||
{
|
||||
try
|
||||
{
|
||||
foreach ( \IPS\Db::i()->select( '*', 'cms_page_widget_areas', array( 'area_page_id=?', \IPS\Request::i()->pageID ) ) as $item )
|
||||
{
|
||||
$blocks = json_decode( $item['area_widgets'], TRUE );
|
||||
|
||||
foreach( $blocks as $block )
|
||||
{
|
||||
if( $block['key'] == $key[2] AND $block['unique'] == $key[3] )
|
||||
{
|
||||
if ( isset( $block['app'] ) and $block['app'] == $key[1] )
|
||||
{
|
||||
$widget = \IPS\Widget::load( \IPS\Application::load( $block['app'] ), $block['key'], $block['unique'], $block['configuration'], null, \IPS\Request::i()->orientation );
|
||||
}
|
||||
elseif ( isset( $block['plugin'] ) and $block['plugin'] == $key[1] )
|
||||
{
|
||||
$widget = \IPS\Widget::load( \IPS\Plugin::load( $block['plugin'] ), $block['key'], $block['unique'], $block['configuration'], null, \IPS\Request::i()->orientation );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch ( \UnderflowException $e ) { }
|
||||
|
||||
/* Make sure the current page is set so the widgets have database/page scope */
|
||||
\IPS\cms\Pages\Page::$currentPage = \IPS\cms\Pages\Page::load( \IPS\Request::i()->pageID );
|
||||
|
||||
/* Have we got a database for this page? */
|
||||
$database = \IPS\cms\Pages\Page::$currentPage->getDatabase();
|
||||
|
||||
if ( $database )
|
||||
{
|
||||
\IPS\cms\Databases\Dispatcher::i()->setDatabase( $database->id );
|
||||
}
|
||||
}
|
||||
|
||||
if ( !isset( $widget ) )
|
||||
{
|
||||
try
|
||||
{
|
||||
$widget = \IPS\Widget::load( \IPS\Application::load( $key[1] ), $key[2], $key[3], array(), null, \IPS\Request::i()->orientation );
|
||||
|
||||
}
|
||||
catch ( \OutOfRangeException $e )
|
||||
{
|
||||
$widget = \IPS\Widget::load( \IPS\Plugin::load( $key[1] ), $key[2], $key[3], array(), null, \IPS\Request::i()->orientation );
|
||||
}
|
||||
}
|
||||
|
||||
$output = (string) $widget;
|
||||
|
||||
\IPS\Output::i()->output = ( $output ) ? $output : \IPS\Theme::i()->getTemplate( 'widgets', 'core', 'front' )->blankWidget( $widget );
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Configuration
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function getConfiguration()
|
||||
{
|
||||
/* Standard widget area, allow the core stuff to handle this */
|
||||
if( in_array( \IPS\Request::i()->area, array( 'sidebar', 'header', 'footer' ) ) )
|
||||
{
|
||||
return parent::getConfiguration();
|
||||
}
|
||||
|
||||
$key = explode( "_", \IPS\Request::i()->block );
|
||||
$blocks = array( 'area_widgets' => NULL );
|
||||
|
||||
/* CMS only stuff */
|
||||
try
|
||||
{
|
||||
$blocks = \IPS\Db::i()->select( '*', 'cms_page_widget_areas', array( 'area_page_id=? AND area_area=?', \IPS\Request::i()->pageID, \IPS\Request::i()->pageArea ) )->first();
|
||||
|
||||
$where = ( $key[0] ) == 'app' ? '`key`=? AND `app`=?' : '`key`=? AND `plugin`=?';
|
||||
$widgetMaster = \IPS\Db::i()->select( '*', 'core_widgets', array( $where, $key[2], $key[1] ) )->first();
|
||||
}
|
||||
catch ( \UnderflowException $e )
|
||||
{
|
||||
}
|
||||
|
||||
$blocks = json_decode( $blocks['area_widgets'], TRUE );
|
||||
$widget = NULL;
|
||||
|
||||
if( !empty( $blocks ) )
|
||||
{
|
||||
foreach ( $blocks as $k => $block )
|
||||
{
|
||||
if ( $block['key'] == $key[2] AND $block['unique'] == $key[3] )
|
||||
{
|
||||
if ( isset( $block['app'] ) and $block['app'] == $key[1] )
|
||||
{
|
||||
$widget = \IPS\Widget::load( \IPS\Application::load( $block['app'] ), $block['key'], $block['unique'], $block['configuration'] );
|
||||
$widget->menuStyle = $widgetMaster['menu_style'];
|
||||
}
|
||||
elseif ( isset( $block['plugin'] ) and $block['plugin'] == $key[1] )
|
||||
{
|
||||
$widget = \IPS\Widget::load( \IPS\Plugin::load( $block['plugin'] ), $block['key'], $block['unique'], $block['configuration'] );
|
||||
$widget->menuStyle = $widgetMaster['menu_style'];
|
||||
}
|
||||
}
|
||||
|
||||
if( $widget !== NULL AND method_exists( $widget, 'configuration' ) )
|
||||
{
|
||||
$form = new \IPS\Helpers\Form( 'form', 'saveSettings' );
|
||||
if ( $widget->configuration( $form ) !== NULL )
|
||||
{
|
||||
if ( $values = $form->values() )
|
||||
{
|
||||
if ( method_exists( $widget, 'preConfig' ) )
|
||||
{
|
||||
$values = $widget->preConfig( $values );
|
||||
}
|
||||
|
||||
$blocks[ $k ]['configuration'] = $values;
|
||||
\IPS\Db::i()->insert( 'cms_page_widget_areas', array( 'area_page_id' => \IPS\Request::i()->pageID, 'area_area' => \IPS\Request::i()->pageArea, 'area_widgets' => json_encode( $blocks ) ), TRUE );
|
||||
\IPS\Output::i()->json( 'OK' );
|
||||
}
|
||||
\IPS\Output::i()->sendOutput( $widget->configuration()->customTemplate( array( call_user_func_array( array( \IPS\Theme::i(), 'getTemplate' ), array( 'widgets', 'core' ) ), 'formTemplate' ), $widget ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Reorder Blocks
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function saveOrder()
|
||||
{
|
||||
$newOrder = array();
|
||||
$seen = array();
|
||||
|
||||
try
|
||||
{
|
||||
$currentConfig = \IPS\Db::i()->select( '*', 'cms_page_widget_areas', array( 'area_page_id=? AND area_area=?', \IPS\Request::i()->pageID, \IPS\Request::i()->area ) )->first();
|
||||
$widgets = json_decode( $currentConfig['area_widgets'], TRUE );
|
||||
}
|
||||
catch ( \UnderflowException $e )
|
||||
{
|
||||
$widgets = array();
|
||||
}
|
||||
|
||||
/* Loop over the new order and merge in current blocks so we don't lose config */
|
||||
if ( isset ( \IPS\Request::i()->order ) )
|
||||
{
|
||||
foreach ( \IPS\Request::i()->order as $block )
|
||||
{
|
||||
$block = explode( "_", $block );
|
||||
|
||||
$added = FALSE;
|
||||
foreach( $widgets as $widget )
|
||||
{
|
||||
if ( $widget['key'] == $block[2] and $widget['unique'] == $block[3] )
|
||||
{
|
||||
$seen[] = $widget['unique'];
|
||||
$newOrder[] = $widget;
|
||||
$added = TRUE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if( !$added )
|
||||
{
|
||||
$newBlock = array();
|
||||
|
||||
if ( $block[0] == 'app' )
|
||||
{
|
||||
$newBlock['app'] = $block[1];
|
||||
}
|
||||
else
|
||||
{
|
||||
$newBlock['plugin'] = $block[1];
|
||||
}
|
||||
|
||||
$newBlock['key'] = $block[2];
|
||||
$newBlock['unique'] = $block[3];
|
||||
$newBlock['configuration'] = array();
|
||||
|
||||
/* Make sure this widget doesn't have configuration in another area */
|
||||
$newBlock['configuration'] = \IPS\cms\Widget::getConfiguration( $newBlock['unique'] );
|
||||
|
||||
$seen[] = $block[3];
|
||||
$newOrder[] = $newBlock;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Anything to update? */
|
||||
if ( count( $widgets ) > count( $newOrder ) )
|
||||
{
|
||||
/* No items left in area, or one has been removed */
|
||||
foreach( $widgets as $widget )
|
||||
{
|
||||
/* If we haven't seen this widget, it's been removed, so add to trash */
|
||||
if ( ! in_array( $widget['unique'], $seen ) )
|
||||
{
|
||||
\IPS\Widget::trash( $widget['unique'], $widget );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Expire Caches so up to date information displays */
|
||||
\IPS\Widget::deleteCaches();
|
||||
|
||||
/* Save to database */
|
||||
$orientation = ( isset( \IPS\Request::i()->orientation ) and \IPS\Request::i()->orientation === 'vertical' ) ? 'vertical' : 'horizontal';
|
||||
\IPS\Db::i()->replace( 'cms_page_widget_areas', array( 'area_orientation' => $orientation, 'area_page_id' => \IPS\Request::i()->pageID, 'area_widgets' => json_encode( $newOrder ), 'area_area' => \IPS\Request::i()->area ) );
|
||||
|
||||
\IPS\cms\Pages\Page::load( \IPS\Request::i()->pageID )->postWidgetOrderSave();
|
||||
}
|
||||
}
|
||||
Whitespace-only changes.
@@ -0,0 +1,265 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief [Front] Page Controller
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Social Suite
|
||||
* @since 25 Feb 2014
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
|
||||
namespace IPS\cms\modules\front\pages;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* page
|
||||
*/
|
||||
class _page extends \IPS\Dispatcher\Controller
|
||||
{
|
||||
/**
|
||||
* Execute
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function execute()
|
||||
{
|
||||
parent::execute();
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine which method to load
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function manage()
|
||||
{
|
||||
$this->view();
|
||||
}
|
||||
|
||||
/**
|
||||
* Display a page. Sounds simple doesn't it? Well it's not.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function view()
|
||||
{
|
||||
$page = $this->getPage();
|
||||
|
||||
/* Database specific checks */
|
||||
if ( isset( \IPS\Request::i()->advancedSearchForm ) AND isset( \IPS\Request::i()->d ) )
|
||||
{
|
||||
/* showTableSearchForm just triggers __call which returns the database dispatcher HTML as we
|
||||
* do not want the page content around the actual database */
|
||||
\IPS\Output::i()->output = $this->showTableSearchForm();
|
||||
return;
|
||||
}
|
||||
|
||||
$includes = $page->getIncludes();
|
||||
|
||||
if ( isset( $includes['js'] ) and is_array( $includes['js'] ) )
|
||||
{
|
||||
\IPS\Output::i()->jsFiles = array_merge( \IPS\Output::i()->jsFiles, array_values( $includes['js'] ) );
|
||||
}
|
||||
|
||||
/* Display */
|
||||
if ( $page->ipb_wrapper or $page->type === 'builder' )
|
||||
{
|
||||
$page->setTheme();
|
||||
$nav = array();
|
||||
|
||||
\IPS\Output::i()->title = $page->getHtmlTitle();
|
||||
|
||||
/* This has to be done after setTheme(), otherwise \IPS\Theme::switchTheme() can wipe out CSS includes */
|
||||
if ( isset( $includes['css'] ) and is_array( $includes['css'] ) )
|
||||
{
|
||||
\IPS\Output::i()->cssFiles = array_merge( \IPS\Output::i()->cssFiles, array_values( $includes['css'] ) );
|
||||
}
|
||||
|
||||
if ( $page->type === 'builder' )
|
||||
{
|
||||
list( $group, $name, $key ) = explode( '__', $page->template );
|
||||
\IPS\Output::i()->output = \IPS\Theme::i()->getTemplate('pages')->globalWrap( $nav, \IPS\cms\Theme::i()->getTemplate($group, 'cms', 'page')->$name( $page, $page->getWidgets() ), $page );
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Populate \IPS\Output::i()->sidebar['widgets'] sidebar/header/footer widgets */
|
||||
$page->getWidgets();
|
||||
|
||||
\IPS\Output::i()->output = \IPS\Theme::i()->getTemplate('pages')->globalWrap( $nav, $page->getHtmlContent(), $page );
|
||||
}
|
||||
|
||||
\IPS\Output::i()->sidebar['enabled'] = true;
|
||||
|
||||
/* Set the meta tags, but do not reset them if they are already set - articles can define custom meta tags and this code
|
||||
overwrites the ones set by articles if we don't verify they aren't set first */
|
||||
if ( $page->meta_keywords AND ( !isset( \IPS\Output::i()->metaTags['keywords'] ) OR !\IPS\Output::i()->metaTags['keywords'] ) )
|
||||
{
|
||||
\IPS\Output::i()->metaTags['keywords'] = $page->meta_keywords;
|
||||
}
|
||||
|
||||
if ( $page->meta_description AND ( !isset( \IPS\Output::i()->metaTags['description'] ) OR !\IPS\Output::i()->metaTags['description'] ) )
|
||||
{
|
||||
\IPS\Output::i()->metaTags['description'] = $page->meta_description;
|
||||
}
|
||||
|
||||
/* Can only disable sidebar if HTML page */
|
||||
if ( ! $page->show_sidebar and $page->type === 'html' )
|
||||
{
|
||||
\IPS\Output::i()->sidebar['enabled'] = false;
|
||||
}
|
||||
|
||||
\IPS\Output::i()->cssFiles = array_merge( \IPS\Output::i()->cssFiles, \IPS\Theme::i()->css( 'pages/page.css', 'cms', 'front' ) );
|
||||
|
||||
if ( \IPS\Request::i()->path == $page->full_path )
|
||||
{
|
||||
/* Just viewing this page, no database categories or records */
|
||||
$permissions = $page->permissions();
|
||||
\IPS\Session::i()->setLocation( $page->url(), explode( ",", $permissions['perm_view'] ), 'loc_cms_viewing_page', array( 'cms_page_' . $page->_id => TRUE ) );
|
||||
}
|
||||
|
||||
if ( ! ( \IPS\Application::load('cms')->default AND ! $page->folder_id AND $page->default ) )
|
||||
{
|
||||
\IPS\Output::i()->breadcrumb['module'] = array( $page->url(), $page->_title );
|
||||
}
|
||||
|
||||
\IPS\Output::i()->allowDefaultWidgets = FALSE;
|
||||
/* Let the dispatcher finish off and show page */
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( isset( $includes['css'] ) and is_array( $includes['css'] ) )
|
||||
{
|
||||
\IPS\Output::i()->cssFiles = array_merge( \IPS\Output::i()->cssFiles, array_values( $includes['css'] ) );
|
||||
}
|
||||
|
||||
if ( $page->wrapper_template and $page->wrapper_template !== '_none_' and ! \IPS\Request::i()->isAjax() )
|
||||
{
|
||||
try
|
||||
{
|
||||
list( $group, $name, $key ) = explode( '__', $page->wrapper_template );
|
||||
\IPS\Output::i()->sendOutput( \IPS\cms\Theme::i()->getTemplate($group, 'cms', 'page')->$name( $page->getHtmlContent(), $page->getHtmlTitle() ), 200, $page->getContentType(), \IPS\Output::i()->httpHeaders );
|
||||
}
|
||||
catch( \OutOfRangeException $e )
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/* Set the title */
|
||||
\IPS\Output::i()->title = $page->getHtmlTitle();
|
||||
\IPS\Member::loggedIn()->language()->parseOutputForDisplay( \IPS\Output::i()->title );
|
||||
|
||||
/* Send straight to the output engine */
|
||||
\IPS\Output::i()->sendOutput( $page->getHtmlContent(), 200, $page->getContentType(), \IPS\Output::i()->httpHeaders );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the current page
|
||||
*
|
||||
* @return \IPS\cms\Pages\Page
|
||||
*/
|
||||
public function getPage()
|
||||
{
|
||||
$page = null;
|
||||
if ( isset( \IPS\Request::i()->page_id ) )
|
||||
{
|
||||
try
|
||||
{
|
||||
$page = \IPS\cms\Pages\Page::load( \IPS\Request::i()->page_id );
|
||||
}
|
||||
catch ( \OutOfRangeException $e )
|
||||
{
|
||||
\IPS\Output::i()->error( 'content_err_page_404', '2T187/1', 404, '' );
|
||||
}
|
||||
}
|
||||
else if ( isset( \IPS\Request::i()->path ) AND \IPS\Request::i()->path != '/' )
|
||||
{
|
||||
try
|
||||
{
|
||||
$page = \IPS\cms\Pages\Page::loadFromPath( \IPS\Request::i()->path );
|
||||
}
|
||||
catch ( \OutOfRangeException $e )
|
||||
{
|
||||
try
|
||||
{
|
||||
\IPS\Output::i()->redirect( \IPS\cms\Pages\Page::getUrlFromHistory( \IPS\Request::i()->path, ( isset( \IPS\Request::i()->url()->data['query'] ) ? \IPS\Request::i()->url()->data['query'] : NULL ) ), NULL, 301 );
|
||||
}
|
||||
catch( \OutOfRangeException $e )
|
||||
{
|
||||
\IPS\Output::i()->error( 'content_err_page_404', '2T187/2', 404, '' );
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
try
|
||||
{
|
||||
$page = \IPS\cms\Pages\Page::getDefaultPage();
|
||||
}
|
||||
catch ( \OutOfRangeException $e )
|
||||
{
|
||||
\IPS\Output::i()->error( 'content_err_page_404', '2T257/1', 404, '' );
|
||||
}
|
||||
}
|
||||
|
||||
if ( $page === NULL )
|
||||
{
|
||||
\IPS\Output::i()->error( 'content_err_page_404', '2T257/2', 404, '' );
|
||||
}
|
||||
|
||||
if ( ! $page->can('view') )
|
||||
{
|
||||
\IPS\Output::i()->error( 'content_err_page_403', '2T187/3', 403, '' );
|
||||
}
|
||||
|
||||
/* Set the current page, so other blocks, DBs, etc don't have to figure out where they are */
|
||||
\IPS\cms\Pages\Page::$currentPage = $page;
|
||||
|
||||
return $page;
|
||||
}
|
||||
|
||||
/**
|
||||
* Capture database specific things
|
||||
*
|
||||
* @param string $method Desired method
|
||||
* @param array $args Arguments
|
||||
* @return void
|
||||
*/
|
||||
public function __call( $method, $args )
|
||||
{
|
||||
$page = $this->getPage();
|
||||
|
||||
$databaseId = ( isset( \IPS\Request::i()->d ) ) ? \IPS\Request::i()->d : $page->getDatabase()->_id;
|
||||
|
||||
if ( $databaseId !== NULL )
|
||||
{
|
||||
try
|
||||
{
|
||||
return \IPS\cms\Databases\Dispatcher::i()->setDatabase( $databaseId )->run();
|
||||
}
|
||||
catch( \OutOfRangeException $e )
|
||||
{
|
||||
\IPS\Output::i()->error( 'content_err_page_404', '2T257/3', 404, '' );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Embed
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function embed()
|
||||
{
|
||||
return $this->__call( 'embed', func_get_args() );
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user