[TYPO3-dev] Bug in extension bs_headerselector
skotthof
sebastian.kotthoff at rz.uni-mannheim.de
Fri Sep 5 13:03:39 CEST 2014
Hi,
here is the patch directly in the mail,
Regards,
Sebastian
--------------------------------------------
--- pi1/class.tx_bsheaderselector_pi1.php.orig.8.1 2014-09-05 12:03:14.217350879 +0200
+++ pi1/class.tx_bsheaderselector_pi1.php 2014-09-05 12:08:12.525358392 +0200
@@ -24,15 +24,15 @@
/**
* Plugin '' for the 'bs_headerselector' extension.
*
* @author Michael Wallner <Michael.Wallner at badSOFT.net>
*/
-//require_once(PATH_tslib.'class.tslib_pibase.php');
+require_once(PATH_tslib.'class.tslib_pibase.php');
class tx_bsheaderselector_pi1 extends tslib_pibase {
var $prefixId = 'tx_bsheaderselector_pi1'; // Same as class name
var $scriptRelPath = 'pi1/class.tx_bsheaderselector_pi1.php'; // Path to this script relative to the extension dir.
var $extKey = 'bs_headerselector'; // The extension key.
var $pi_checkCHash = TRUE;
@@ -44,14 +44,16 @@
$this->conf = $conf;
// store table information
$this->type = $GLOBALS['TSFE']->page['tx_bsheaderselector_header'];
switch($this->type){
case 0:
$this->file = $this->getParentsHeader();
+ if (!isset($this->file))
+ return "";
break;
case 1:
return "";
case 2:
$this->file = $GLOBALS['TSFE']->page['tx_bsheaderselector_file'];
}
$this->ext = substr($this->file,-3);
@@ -107,14 +109,16 @@
function getParentsHeader() {
foreach($GLOBALS['TSFE']->config['rootLine'] as $topPage) {
// Recursive header found
if ($topPage['tx_bsheaderselector_header'] == 2) {
$headerFile = $this->uploadDir . $topPage['tx_bsheaderselector_file'];
}
+ else
+ return NULL;
}
// Return header file
return $headerFile;
}
function writeFlashObjectParams() {
--------------------------------------------
On Fri, Sep 05, 2014 at 01:00:50PM +0200, skotthof wrote:
> Hello dear list members,
>
> at the moment, we still use a Typo3 4.5. It seams, there is a bug
> in (the outdated) extension bs_headerselector version 0.8.1 .
>
> (If current side has selected "take image from parent side" (=0), it is not checked, if the parent side
> has really a picture selected. If the parent side was set to "no image" (=1) the code outputs something like
> <img style="width:500;height:200;border:0pt none;" src="uploads/tx_bsheaderselector/">
> which is an image with a folder in "path". It sould be empty "")
>
> Anyway There is a patch attached for Version 8.1.
>
> The Plugin seems to be compatible with Typo3 6.2, but is there an alternative for that old
> Plugin?
>
> Regards,
>
> Sebastian
>
> --
> Sebastian Kotthoff
> Rechenzentrum
> Universität Mannheim
> B6, 23-29; Building B; Room 1.16
> 68159 Mannheim
>
> Tel: +49 621 181 2516
> Fax: +49 621 181 2682
> _______________________________________________
> TYPO3-dev mailing list
> TYPO3-dev at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-dev
--
Sebastian Kotthoff
Rechenzentrum
Universität Mannheim
B6, 23-29; Building B; Room 1.16
68159 Mannheim
Tel: +49 621 181 2516
Fax: +49 621 181 2682
More information about the TYPO3-dev
mailing list