[Openupload-svn-update] SF.net SVN: openupload:[316] trunk/www/plugins/captcha.php
Status: Beta
Brought to you by:
tsdogs
|
From: <ts...@us...> - 2009-05-18 20:14:17
|
Revision: 316
http://openupload.svn.sourceforge.net/openupload/?rev=316&view=rev
Author: tsdogs
Date: 2009-05-18 20:14:09 +0000 (Mon, 18 May 2009)
Log Message:
-----------
fix bug #2793336 (SI_IMAGE_JPEG typo)
try to fix problem with OpenSuse sending a 0x0A char (probably from config.inc.php)
Modified Paths:
--------------
trunk/www/plugins/captcha.php
Modified: trunk/www/plugins/captcha.php
===================================================================
--- trunk/www/plugins/captcha.php 2009-05-18 20:12:52 UTC (rev 315)
+++ trunk/www/plugins/captcha.php 2009-05-18 20:14:09 UTC (rev 316)
@@ -1,5 +1,5 @@
<?php
-
+ob_start();
/* disable error reporting to the browser */
ini_set('display_errors',0);
@@ -8,12 +8,13 @@
require_once($CONFIG['INSTALL_ROOT'].'/plugins/securimage/securimage.php');
-
$img = new securimage();
$img->ttf_file = $CONFIG['INSTALL_ROOT'].'/plugins/securimage/elephant.ttf';
$img->code_length = 6;
$img->image_width = 200;
-$img->image_type = 'SI_IMAGE_JPG';
+$img->image_type = 'SI_IMAGE_JPEG';
+/* remove all output before the image */
+ob_clean();
$img->show();
?>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|