![]() |
|
Welcome to the Computer Webmaster Gaming Console Graphics Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact us. |
| |||||||
| Pear Pear programming, this is a very complex subject as with using pear with php can be a difficult task for some, so lets talk pear. |
![]() |
| | LinkBack | Thread Tools | Display Modes |
| | #1 | ||
| cellog Fri May 25 20:09:47 2007 UTC Modified files: /pearweb/include/bugs pear-bug-accountrequest.php /pearweb/public_html/bugs bug.php patch-add.php report.php Log: another attempt for #11146 http://cvs.php.net/viewvc.cgi/pearwe...&diff_format=u Index: pearweb/include/bugs/pear-bug-accountrequest.php diff -u pearweb/include/bugs/pear-bug-accountrequest.php:1.28 pearweb/include/bugs/pear-bug-accountrequest.php:1.29 --- pearweb/include/bugs/pear-bug-accountrequest.php:1.28 Fri May 25 19:48:38 2007 +++ pearweb/include/bugs/pear-bug-accountrequest.php Fri May 25 20:09:47 2007 @@ -12,23 +12,23 @@ { $this->dbh = &$GLOBALS['dbh']; if ($handle) { - $this->user = $handle; + $this->handle = $handle; } else { - $this->user = isset($GLOBALS['auth_user']) ? $GLOBALS['auth_user']->handle : false; + $this->handle = isset($GLOBALS['auth_user']) ? $GLOBALS['auth_user']->handle : false; } $this->cleanOldRequests(); } function pending() { - if (!$this->user) { + if (!$this->handle) { return false; } $request = $this->dbh->getOne(' SELECT handle FROM bug_account_request WHERE handle=? - ', array($this->user)); + ', array($this->handle)); if ($request) { return true; @@ -38,14 +38,14 @@ function sendEmail() { - if (!$this->user) { + if (!$this->handle) { throw new Exception('Internal fault: user was not set when sending email, please report to pear-core@lists.php.net'); } $salt = $this->dbh->getOne(' SELECT salt FROM bug_account_request WHERE handle=? - ', array($this->user)); + ', array($this->handle)); if (!$salt) { throw new Exception('No such handle found, cannot send confirmation email'); } @@ -95,7 +95,6 @@ foreach ($request as $field => $value) { $this->$field = $value; } - $this->user = $this->handle; return true; } return false; @@ -135,7 +134,8 @@ return $res; } - $this->user = $handle; + $this->handle = $this->dbh->getOne('SELECT handle FROM bug_account_request WHERE + salt=?', array($salt)); return $salt; } http://cvs.php.net/viewvc.cgi/pearwe...&diff_format=u Index: pearweb/public_html/bugs/bug.php diff -u pearweb/public_html/bugs/bug.php:1.165 pearweb/public_html/bugs/bug.php:1.166 --- pearweb/public_html/bugs/bug.php:1.165 Fri May 25 19:56:10 2007 +++ pearweb/public_html/bugs/bug.php Fri May 25 20:09:47 2007 @@ -15,7 +15,7 @@ * @package Bugs * @copyright Copyright (c) 1997-2005 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License - * @version $Id: bug.php,v 1.165 2007/05/25 19:56:10 cellog Exp $ + * @version $Id: bug.php,v 1.166 2007/05/25 20:09:47 cellog Exp $ */ /* @@ -316,7 +316,7 @@ break; } $_POST['in']['handle'] = - $_POST['in']['name'] = substr('#' . $salt, 0, 19); + $_POST['in']['name'] = $buggie->handle; } else { $_POST['in']['commentemail'] = $auth_user->email; $_POST['in']['handle'] = $auth_user->handle; http://cvs.php.net/viewvc.cgi/pearwe...&diff_format=u Index: pearweb/public_html/bugs/patch-add.php diff -u pearweb/public_html/bugs/patch-add.php:1.13 pearweb/public_html/bugs/patch-add.php:1.14 --- pearweb/public_html/bugs/patch-add.php:1.13 Fri May 25 19:48:38 2007 +++ pearweb/public_html/bugs/patch-add.php Fri May 25 20:09:47 2007 @@ -102,7 +102,7 @@ $bug = $buginfo['id']; PEAR: $e = $patchinfo->attach($bug, 'patch', $_POST['name'], - '#' . substr($salt, 0, 19), $_POST['obsoleted']); + $buggie->handle, $_POST['obsoleted']); PEAR: if (PEAR::isError($e)) { $buggie->deleteRequest(); @@ -124,15 +124,13 @@ '/templates/bugs/addpatch.php'; exit; } - if (!DEVBOX) { - try { - $buggie->sendEmail(); - } catch (Exception $e) { - response_header('Error sending confirmation email'); - report_error(array('Patch was successfully attached, but account confirmation email not sent, please report to pear-core@lists.php.net', $e)); - response_footer(); - exit; - } + try { + $buggie->sendEmail(); + } catch (Exception $e) { + response_header('Error sending confirmation email'); + report_error(array('Patch was successfully attached, but account confirmation email not sent, please report to pear-core@lists.php.net', $e)); + response_footer(); + exit; } localRedirect('/bugs/patch-display.php?bug=' . $bug . '&patch=' . urlencode($_POST['name']) . '&revision=' . $e); http://cvs.php.net/viewvc.cgi/pearwe...&diff_format=u Index: pearweb/public_html/bugs/report.php diff -u pearweb/public_html/bugs/report.php:1.108 pearweb/public_html/bugs/report.php:1.109 --- pearweb/public_html/bugs/report.php:1.108 Fri May 25 19:48:38 2007 +++ pearweb/public_html/bugs/report.php Fri May 25 20:09:47 2007 @@ -17,7 +17,7 @@ * @package Bugs * @copyright Copyright (c) 1997-2005 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License - * @version $Id: report.php,v 1.108 2007/05/25 19:48:38 cellog Exp $ + * @version $Id: report.php,v 1.109 2007/05/25 20:09:47 cellog Exp $ */ /** @@ -223,7 +223,7 @@ } $_POST['in']['handle'] = - $_POST['in']['reporter_name'] = substr('#' . $salt, 0, 19); + $_POST['in']['reporter_name'] = $buggie->handle; try { $buggie->sendEmail(); } catch (Exception $e) { | |||
| Featured Websites | ||||
|
![]() |
| Tags: bugphp, cvs, includebugs, patchaddphp, pearweb, public_htmlbugs, reportphp |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| cvs: pearweb /public_html/bugs bug.php | Greg Beaver | Pear | 0 | 05-27-2007 7:47 PM |
| cvs: pearweb /include/bugs pear-bug-accountrequest.php | Greg Beaver | Pear | 0 | 05-27-2007 7:47 PM |
| cvs: pearweb /public_html/bugs stats.php | Mark Wiesemann | Pear | 0 | 05-20-2007 7:42 PM |
| cvs: pearweb /public_html/bugs bug.php | Mark Wiesemann | Pear | 0 | 05-20-2007 7:42 PM |
| cvs: pearweb /public_html/bugs/rss bug.php | Mark Wiesemann | Pear | 0 | 05-20-2007 7:42 PM |
| Featured Websites | ||||
|