mirror of
https://github.com/e107inc/e107.git
synced 2025-03-11 07:59:44 +01:00
Missing legacy constants in some cases;
Featurebox empty tablerender removed when there are hidden items; Index page (when set Welcome Message) empty tablerender removed;
This commit is contained in:
parent
a73dc8ed10
commit
a2c8e9046e
@ -179,5 +179,7 @@ class core_index_index_controller extends eController
|
||||
public function actionFront()
|
||||
{
|
||||
// we could notify current theme we are in front page controlled by the theme layout only...
|
||||
// switch off tablerender
|
||||
$this->getResponse()->setParam('render', false);
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/*
|
||||
* Copyright (c) e107 Inc 2009 - e107.org, Licensed under GNU GPL (http://www.gnu.org/licenses/gpl.txt)
|
||||
* Copyright (c) e107 Inc e107.org, Licensed under GNU GPL (http://www.gnu.org/licenses/gpl.txt)
|
||||
* $Id$
|
||||
*
|
||||
* Featurebox shortcode batch class - shortcodes available site-wide. ie. equivalent to multiple .sc files.
|
||||
@ -57,7 +57,7 @@ class featurebox_shortcodes // must match the plugin's folder name. ie. [PLUGIN_
|
||||
// reset to default, update current
|
||||
$category->setParams($defopt)
|
||||
->updateParams($parm);
|
||||
|
||||
|
||||
if(!$category->hasData())
|
||||
{
|
||||
return '';
|
||||
@ -66,8 +66,11 @@ class featurebox_shortcodes // must match the plugin's folder name. ie. [PLUGIN_
|
||||
$tmpl = $this->getFboxTemplate($ctemplate);
|
||||
$tp = e107::getParser();
|
||||
|
||||
// Fix - don't use tablerender if no result (category could contain hidden items)
|
||||
$ret = $this->render($category, $ctemplate, $parm);
|
||||
if(empty($ret)) return '';
|
||||
|
||||
$ret = $tp->parseTemplate($tmpl['list_start'], true, $category).$this->render($category, $ctemplate, $parm).$tp->parseTemplate($tmpl['list_end'], true, $category);
|
||||
$ret = $tp->parseTemplate($tmpl['list_start'], true, $category).$ret.$tp->parseTemplate($tmpl['list_end'], true, $category);
|
||||
if(isset($parm['notablestyle']))
|
||||
{
|
||||
return $ret;
|
||||
|
11
index.php
11
index.php
@ -28,13 +28,18 @@
|
||||
$front->init()
|
||||
->run();
|
||||
|
||||
$request = $front->getRequest();
|
||||
|
||||
// If not already done - define legacy constants
|
||||
$request->setLegacyQstring();
|
||||
$request->setLegacyPage();
|
||||
|
||||
$inc = $front->isLegacy();
|
||||
if($inc)
|
||||
{
|
||||
// last chance to set legacy env
|
||||
$request = $front->getRequest();
|
||||
$request->setLegacyQstring();
|
||||
$request->setLegacyPage();
|
||||
|
||||
$request->populateRequestParams();
|
||||
if(!is_file($inc) || !is_readable($inc))
|
||||
{
|
||||
echo 'Bad request - destination unreachable - '.$inc;
|
||||
|
Loading…
x
Reference in New Issue
Block a user