logo       
Google Custom Search
    AddThis Social Bookmark Button
-->

cvs: pearweb /public_html/bugs bug.php report.php /public_html/bugs/includ: msg#00050

Subject: cvs: pearweb /public_html/bugs bug.php report.php /public_html/bugs/include functions.inc
pajoye          Sat Mar 18 01:15:32 2006 UTC

  Modified files:              
    /pearweb/public_html/bugs   bug.php report.php 
    /pearweb/public_html/bugs/include   functions.inc 
  Log:
  - #7144, pear.dev does not need to enter a password
  - do not show the "Edit submission" tab for pear.dev, no need
  
  
http://cvs.php.net/viewcvs.cgi/pearweb/public_html/bugs/bug.php?r1=1.104&r2=1.105&diff_format=u
Index: pearweb/public_html/bugs/bug.php
diff -u pearweb/public_html/bugs/bug.php:1.104 
pearweb/public_html/bugs/bug.php:1.105
--- pearweb/public_html/bugs/bug.php:1.104      Tue Mar 14 22:46:24 2006
+++ pearweb/public_html/bugs/bug.php    Sat Mar 18 01:15:32 2006
@@ -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.104 2006/03/14 22:46:24 danielc Exp $
+ * @version   $Id: bug.php,v 1.105 2006/03/18 01:15:32 pajoye Exp $
  */
 
 /*
@@ -511,9 +511,9 @@
 }
 if ($auth_user) {
     control(1, 'Developer');
+} else {
+    control(2, 'Edit Submission');
 }
-control(2, 'Edit Submission');
-
 ?>
 
 </div>
http://cvs.php.net/viewcvs.cgi/pearweb/public_html/bugs/report.php?r1=1.59&r2=1.60&diff_format=u
Index: pearweb/public_html/bugs/report.php
diff -u pearweb/public_html/bugs/report.php:1.59 
pearweb/public_html/bugs/report.php:1.60
--- pearweb/public_html/bugs/report.php:1.59    Wed Feb 22 12:47:10 2006
+++ pearweb/public_html/bugs/report.php Sat Mar 18 01:15:32 2006
@@ -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.59 2006/02/22 12:47:10 pajoye Exp $
+ * @version   $Id: report.php,v 1.60 2006/03/18 01:15:32 pajoye Exp $
  */
 
 /**
@@ -41,8 +41,8 @@
 }
 
 if (isset($_POST['in'])) {
-    if (!($errors = incoming_details_are_valid($_POST['in'], 1))) {
-
+       $errors = incoming_details_are_valid($_POST['in'], 1, ($auth_user && 
$auth_user->registered));
+    if (!$errors) {
         /*
          * When user submits a report, do a search and display
          * the results before allowing them to continue.
@@ -452,8 +452,14 @@
    Password:
   </th>
   <td class="form-input">
+<?php
+if (!($auth_user && $auth_user->registered)) {
+?>
    <input type="password" size="20" maxlength="20" name="in[passwd]"
     value="<?php echo clean($_POST['in']['passwd']); ?>" />
+<?php
+}
+?>
    <p class="cell_note">
     You may enter any password here, which will be stored for this bug report.
     This password allows you to come back and modify your submitted bug report
http://cvs.php.net/viewcvs.cgi/pearweb/public_html/bugs/include/functions.inc?r1=1.103&r2=1.104&diff_format=u
Index: pearweb/public_html/bugs/include/functions.inc
diff -u pearweb/public_html/bugs/include/functions.inc:1.103 
pearweb/public_html/bugs/include/functions.inc:1.104
--- pearweb/public_html/bugs/include/functions.inc:1.103        Tue Mar 14 
04:41:04 2006
+++ pearweb/public_html/bugs/include/functions.inc      Sat Mar 18 01:15:32 2006
@@ -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: functions.inc,v 1.103 2006/03/14 04:41:04 cellog Exp $
+ * @version   $Id: functions.inc,v 1.104 2006/03/18 01:15:32 pajoye Exp $
  */
 
 
@@ -952,7 +952,7 @@
  *
  * @return void
  */
-function incoming_details_are_valid($in, $initial = 0)
+function incoming_details_are_valid($in, $initial = 0, $logged = false)
 {
     global $bug, $dbh, $types;
 
@@ -992,10 +992,9 @@
     if ($initial && empty($in['ldesc'])) {
         $errors[] = 'You must supply a long description of the bug you are 
reporting.';
     }
-
-    if ($initial && empty($in['passwd'])) {
-        $errors[] = 'You must supply a password for this bug report.';
-    }
+    if (!$logged && $initial && empty($in['passwd'])) {
+       $errors[] = 'You must supply a password for this bug report.';
+   }
 
     return $errors;
 }

-- 
PEAR CVS Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




<Prev in Thread] Current Thread [Next in Thread>