svn: /pear/packages/Bugtracker/trunk/ site/bug.php site/patch-add.php site/report.php templates/addpatch.php

From: Date: Thu, 13 Aug 2009 11:24:15 +0000
Subject: svn: /pear/packages/Bugtracker/trunk/ site/bug.php site/patch-add.php site/report.php templates/addpatch.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-57104@lists.php.net to get a copy of this message
jani Thu, 13 Aug 2009 11:24:15 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=287212 Log: - Re-fix the fix for captcha Changed paths: U pear/packages/Bugtracker/trunk/site/bug.php U pear/packages/Bugtracker/trunk/site/patch-add.php U pear/packages/Bugtracker/trunk/site/report.php U pear/packages/Bugtracker/trunk/templates/addpatch.php Modified: pear/packages/Bugtracker/trunk/site/bug.php =================================================================== --- pear/packages/Bugtracker/trunk/site/bug.php 2009-08-13 11:17:46 UTC (rev 287211) +++ pear/packages/Bugtracker/trunk/site/bug.php 2009-08-13 11:24:15 UTC (rev 287212) @@ -113,15 +113,14 @@ } else { require_once 'Text/CAPTCHA/Numeral.php'; $numeralCaptcha = new Text_CAPTCHA_Numeral(); - - $captcha = $numeralCaptcha->getOperation(); - $_SESSION['answer'] = $numeralCaptcha->getAnswer(); } $trytoforce = isset($_POST['trytoforce']) ? (int) $_POST['trytoforce'] : 0; // fetch info about the bug into $bug -if(!$bug) $bug = bugs_get_bug($bug_id, true); +if (!$bug) { + $bug = bugs_get_bug($bug_id, true); +} // DB error if (is_object($bug)) { @@ -846,7 +845,10 @@ echo $preview; -if (!$logged_in) { ?> +if (!$logged_in) { + $captcha = $numeralCaptcha->getOperation(); + $_SESSION['answer'] = $numeralCaptcha->getAnswer(); +?> <table> <tr> <th class="details">Y<span class="accesskey">o</span>ur email address:<br /> Modified: pear/packages/Bugtracker/trunk/site/patch-add.php =================================================================== --- pear/packages/Bugtracker/trunk/site/patch-add.php 2009-08-13 11:17:46 UTC (rev 287211) +++ pear/packages/Bugtracker/trunk/site/patch-add.php 2009-08-13 11:24:15 UTC (rev 287212) @@ -37,9 +37,6 @@ } else { require_once 'Text/CAPTCHA/Numeral.php'; $numeralCaptcha = new Text_CAPTCHA_Numeral(); - - $captcha = $numeralCaptcha->getOperation(); - $_SESSION['answer'] = $numeralCaptcha->getAnswer(); } require_once "{$ROOT_DIR}/include/classes/bug_patchtracker.php"; Modified: pear/packages/Bugtracker/trunk/site/report.php =================================================================== --- pear/packages/Bugtracker/trunk/site/report.php 2009-08-13 11:17:46 UTC (rev 287211) +++ pear/packages/Bugtracker/trunk/site/report.php 2009-08-13 11:24:15 UTC (rev 287212) @@ -24,9 +24,6 @@ } else { require_once 'Text/CAPTCHA/Numeral.php'; $numeralCaptcha = new Text_CAPTCHA_Numeral(); - - $captcha = $numeralCaptcha->getOperation(); - $_SESSION['answer'] = $numeralCaptcha->getAnswer(); } // Handle input @@ -435,7 +432,10 @@ </td> </tr> -<?php if (!$logged_in) { ?> +<?php if (!$logged_in) { + $captcha = $numeralCaptcha->getOperation(); + $_SESSION['answer'] = $numeralCaptcha->getAnswer(); +?> <tr> <th>Solve the problem:<br /><?php echo $captcha; ?> = ?</th> <td class="form-input"><input type="text" name="captcha" /></td> Modified: pear/packages/Bugtracker/trunk/templates/addpatch.php =================================================================== --- pear/packages/Bugtracker/trunk/templates/addpatch.php 2009-08-13 11:17:46 UTC (rev 287211) +++ pear/packages/Bugtracker/trunk/templates/addpatch.php 2009-08-13 11:24:15 UTC (rev 287212) @@ -20,7 +20,10 @@ ?> <table> <?php -if (!$loggedin) {?> +if (!$logged_in) { + $captcha = $numeralCaptcha->getOperation(); + $_SESSION['answer'] = $numeralCaptcha->getAnswer(); +?> <tr> <th class="form-label_left"> Email Address (MUST BE VALID)

« previous php.pear.cvs (#57104) next »