mirror of
https://github.com/e107inc/e107.git
synced 2025-07-26 01:11:28 +02:00
Apply USE_IMAGECODE check in fpw shortcodes.
Fixes fatal error when fpwcode pref is 0. Removed unnecessary file require.
This commit is contained in:
9
fpw.php
9
fpw.php
@@ -25,8 +25,7 @@ if (USER && !getperms('0'))
|
|||||||
if($pref['fpwcode'] && extension_loaded('gd'))
|
if($pref['fpwcode'] && extension_loaded('gd'))
|
||||||
{
|
{
|
||||||
define('USE_IMAGECODE', TRUE);
|
define('USE_IMAGECODE', TRUE);
|
||||||
require_once(e_HANDLER.'secure_img_handler.php');
|
$sec_img = e107::getSecureImg();
|
||||||
$sec_img = new secure_image;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -72,17 +71,17 @@ class fpw_shortcodes extends e_shortcode
|
|||||||
|
|
||||||
function sc_fpw_captcha_hidden($parm='')
|
function sc_fpw_captcha_hidden($parm='')
|
||||||
{
|
{
|
||||||
return; // no longer required - included in renderInput();
|
return; // no longer required - included in renderInput();
|
||||||
}
|
}
|
||||||
|
|
||||||
function sc_fpw_captcha_img($parm='')
|
function sc_fpw_captcha_img($parm='')
|
||||||
{
|
{
|
||||||
return $this->secImg->renderImage();
|
if(USE_IMAGECODE){ return $this->secImg->renderImage(); }
|
||||||
}
|
}
|
||||||
|
|
||||||
function sc_fpw_captcha_input($parm='')
|
function sc_fpw_captcha_input($parm='')
|
||||||
{
|
{
|
||||||
return $this->secImg->renderInput();
|
if(USE_IMAGECODE){ return $this->secImg->renderInput(); }
|
||||||
}
|
}
|
||||||
|
|
||||||
function sc_fpw_logo($parm='')
|
function sc_fpw_logo($parm='')
|
||||||
|
Reference in New Issue
Block a user