cvs: bugtracker /htdocs .htaccess /htdocs/elements screen.css /htdocs/index index.php /includes functions.php user.php /includes/cache
php_version.php /template/generic/bug index.php /template/generic/report report.php /template/generic/user convert.php verify.php /template/php
home.html
| From: | Barry Carlyon | Date: | Wed, 16 Jul 2008 12:13:37 +0000 |
| Subject: | cvs: bugtracker /htdocs .htaccess /htdocs/elements screen.css /htdocs/index index.php /includes functions.php user.php /includes/cache php_version.php /template/generic/bug index.php /template/generic/report report.php /template/generic/user convert.php verify.php /template/php home.html |
||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-2117@lists.php.net to get a copy of this message | ||
bcarlyon Wed Jul 16 12:13:37 2008 UTC
Added files:
/bugtracker/template/generic/user verify.php
Modified files:
/bugtracker/htdocs .htaccess
/bugtracker/htdocs/elements screen.css
/bugtracker/htdocs/index index.php
/bugtracker/includes functions.php user.php
/bugtracker/includes/cache php_version.php
/bugtracker/template/generic/bug index.php
/bugtracker/template/generic/report report.php
/bugtracker/template/generic/user convert.php
/bugtracker/template/php home.html
Log:
Updated Current test details on the home page
Completed the convert functions for temp account to a real one
Added email verification for real users
Added success clause to screen.css
http://cvs.php.net/viewvc.cgi/bugtracker/htdocs/.htaccess?r1=1.2&r2=1.3&diff_format=u Index: bugtracker/htdocs/.htaccess diff -u bugtracker/htdocs/.htaccess:1.2 bugtracker/htdocs/.htaccess:1.3 --- bugtracker/htdocs/.htaccess:1.2 Wed Jul 16 04:19:20 2008 +++ bugtracker/htdocs/.htaccess Wed Jul 16 12:13:36 2008 @@ -15,6 +15,7 @@ #Other shuntage RewriteRule ^login/$ /user/login/ [L,PT] +RewriteRule ^user/verify/(.*)/(.*)$ index/index.php?page=user/verify&email=$1&tehkey=$2 [L,PT] #the big rewrite RewriteRule (.*)$ index/index.php?page=$1&%{QUERY_STRING} [L,PT] http://cvs.php.net/viewvc.cgi/bugtracker/htdocs/elements/screen.css?r1=1.4&r2=1.5&diff_format=u Index: bugtracker/htdocs/elements/screen.css diff -u bugtracker/htdocs/elements/screen.css:1.4 bugtracker/htdocs/elements/screen.css:1.5 --- bugtracker/htdocs/elements/screen.css:1.4 Wed Jul 16 04:19:20 2008 +++ bugtracker/htdocs/elements/screen.css Wed Jul 16 12:13:36 2008 @@ -184,4 +184,14 @@ background: #fee; color: #660000; } +#success { + clear: both; + font-size: 108%; + font-weight: bold; + padding: 1.0em !important; + border: 1px solid #006600; + margin: 1.0em !important; + background: #EEFFEE; + color: #006600; +} http://cvs.php.net/viewvc.cgi/bugtracker/htdocs/index/index.php?r1=1.6&r2=1.7&diff_format=u Index: bugtracker/htdocs/index/index.php diff -u bugtracker/htdocs/index/index.php:1.6 bugtracker/htdocs/index/index.php:1.7 --- bugtracker/htdocs/index/index.php:1.6 Wed Jul 16 04:19:20 2008 +++ bugtracker/htdocs/index/index.php Wed Jul 16 12:13:36 2008 @@ -9,11 +9,12 @@ //backtrace has something to talk too $template_data = array('backtrace' => ''); +$trace = ''; //before we start lets see if the database engine is online include($_SERVER['DOCUMENT_ROOT'] . '/config.php'); include($_SERVER['DOCUMENT_ROOT'] . '../includes/functions.php'); -$errorhandler = set_error_handler("itsanerrorhandler",E_ALL&~E_NOTICE); +$errorhandler = set_error_handler("theerrorhandler",E_ALL&~E_NOTICE); //database time $db = new db(); @@ -23,7 +24,6 @@ { //arg! were offline include($_SERVER['DOCUMENT_ROOT'] . 'offline.html'); - //header('Location: /offline.html'); exit; } @@ -78,7 +78,8 @@ 'form_error' => '', ) ); -$template_data['cvs_version'] = substr( $php_version[sizeof($php_version)] ,0,4); +//$template_data['cvs_version'] = substr( $php_version[sizeof($php_version)] ,0,4); +$template_data['cvs_version'] = substr( $php_version[sizeof($php_version)-1] ,0,4); if ($template != 'php') { $template_data['page_title'] .= ' ' . titleit($bugtracker); @@ -190,6 +191,12 @@ echo '<textarea style="width: 95%; height: 200px; border: 1px solid #000;" rows="10" cols="50">debug: ' . "\n"; echo ' +trace: +'; +echo $trace; + +echo ' + cookie '; print_r($_COOKIE); http://cvs.php.net/viewvc.cgi/bugtracker/includes/functions.php?r1=1.7&r2=1.8&diff_format=u Index: bugtracker/includes/functions.php diff -u bugtracker/includes/functions.php:1.7 bugtracker/includes/functions.php:1.8 --- bugtracker/includes/functions.php:1.7 Wed Jul 16 04:19:20 2008 +++ bugtracker/includes/functions.php Wed Jul 16 12:13:36 2008 @@ -113,60 +113,66 @@ //error control -function itsanerrorhandler($errno, $errstr, $errfile, $errline) +function theerrorhandler($errno, $errstr, $errfile, $errline) { -global $template_data; -$fail = ''; - switch ($errno) { - case E_USER_ERROR: - echo "<b>My ERROR</b> [$errno] $errstr<br />\n"; - echo " Fatal error on line $errline in file $errfile"; - echo ", PHP " . PHP_VERSION . " (" . PHP_OS . ")<br />\n"; - echo "Aborting...<br />\n"; - exit(1); - break; - - case E_USER_WARNING: - $fail = "<b>My WARNING</b> [$errno] $errstr<br />\n"; - break; - - case E_USER_NOTICE: - $fail = "<b>My NOTICE</b> [$errno] $errstr<br />\n"; - break; - - default: - $fail = "Unknown error type: [$errno] $errstr<br />\n"; - break; + global $template_data; + $fail = ''; + switch ($errno) { + case E_USER_ERROR: + echo "<b>My ERROR</b> [$errno] $errstr<br />\n"; + echo " Fatal error on line $errline in file $errfile"; + echo ", PHP " . PHP_VERSION . " (" . PHP_OS . ")<br />\n"; + echo "Aborting...<br />\n"; + exit(1); + break; + case E_USER_WARNING: + $fail = "<b>My WARNING</b> [$errno] $errstr<br />\n"; + break; + case E_USER_NOTICE: + $fail = "<b>My NOTICE</b> [$errno] $errstr<br />\n"; + break; + default: + $fail = "Unknown error type: [$errno] $errstr<br />\n"; + break; } $template_data['backtrace'] .= '<strong>' . $fail . '</strong>'; errorarray(debug_backtrace()); - $template_data['backtrace'] = '<div id="error">' . $template_data['backtrace'] . '</div>'; + $template_data['backtrace'] = '<div id="error" style="font-size: 8px;">' . $template_data['backtrace'] . '</div>'; + + $first_flag = FALSE; return; } function errorarray($array) { - global $template_data; + global $template_data,$first_flag; foreach ($array as $ref => $data) { - $template_data['backtrace'] .= '<br />'; - if (!is_numeric($ref)) - { - $template_data['backtrace'] .= $ref. ': '; - } - if (get_class($data)) - { - $template_data['backtrace'] .= get_class($data); - } - else if (is_array($data)) + if (!$first_flag) { - errorarray($data); + $first_flag = TRUE; } else { - $template_data['backtrace'] .= $data; + $template_data['backtrace'] .= '<br />'; + if (!is_numeric($ref)) + { + $template_data['backtrace'] .= $ref. ': '; + } + if (get_class($data)) + { + $template_data['backtrace'] .= get_class($data); + } + else if (is_array($data)) + { + errorarray($data); + } + else + { + $template_data['backtrace'] .= $data; + } } } http://cvs.php.net/viewvc.cgi/bugtracker/includes/user.php?r1=1.5&r2=1.6&diff_format=u Index: bugtracker/includes/user.php diff -u bugtracker/includes/user.php:1.5 bugtracker/includes/user.php:1.6 --- bugtracker/includes/user.php:1.5 Wed Jul 16 04:19:20 2008 +++ bugtracker/includes/user.php Wed Jul 16 12:13:36 2008 @@ -145,6 +145,7 @@ //this will create a user, BUT WILL NOT CHECK IT EXISTS FIRST //assumes done prior to calling this function + $temp_convert = isset($user_data['temp_handle']) ? TRUE : FALSE; $user_data['temp_handle'] = ''; unset($user_data['temp_handle']); $query = 'INSERT INTO ' . USER_TABLE . ' (' . implode(', ', array_keys($user_data)) . ', registered) VALUES ("'; @@ -163,12 +164,26 @@ { //email time $dest = $user_data['email']; - $subject = 'PHP Bugz Account Conversion'; - $message = 'You or someone else has converted your http://bugs.php.net/ Account to a full account'; + $subject = 'PHP Bugz Account'; + $message = 'You or someone else '; + if ($temp_convert) + { + $subject .= ' Conversion'; + $message .= 'has converted your http://bugs.php.net/ Account to a full account'; + } + else + { + $subject .= ' Creation'; + $message .= 'have signed up to use the phpBugtracker over at http://bugs.php.net/'; + } $message .= "\n\r" . 'In order to continue you will need to verfiy your email address'; $message .= "\n\r" . 'Click the following link, or copy and paste it into your browser'; $message .= "\n\r\n\r"; + $message .= 'http://' . $_SERVER['HTTP_HOST'] . '/user/verify/'; + $message .= $dest . '/'; + $message .= md5( md5($dest) . '_' . md5 ($user_data['password']) ); + $message .= "\n\r\n\r"; $email->send_to_user($dest,$subject,$message); http://cvs.php.net/viewvc.cgi/bugtracker/includes/cache/php_version.php?r1=1.4&r2=1.5&diff_format=u Index: bugtracker/includes/cache/php_version.php diff -u bugtracker/includes/cache/php_version.php:1.4 bugtracker/includes/cache/php_version.php:1.5 --- bugtracker/includes/cache/php_version.php:1.4 Fri Jul 11 13:14:18 2008 +++ bugtracker/includes/cache/php_version.php Wed Jul 16 12:13:36 2008 @@ -1,5 +1,5 @@ <?php - +$php_version[0] = 'Irrelevant'; $php_version[1] = "5.2.6"; $php_version[2] = "4.4.8"; $php_version[3] = "4CVS-2008-06-27 (snap)"; @@ -14,4 +14,4 @@ define(strtoupper(str_replace(' ','_',$data)),$ref); } -?> \ No newline at end of file +?> http://cvs.php.net/viewvc.cgi/bugtracker/template/generic/bug/index.php?r1=1.8&r2=1.9&diff_format=u Index: bugtracker/template/generic/bug/index.php diff -u bugtracker/template/generic/bug/index.php:1.8 bugtracker/template/generic/bug/index.php:1.9 --- bugtracker/template/generic/bug/index.php:1.8 Wed Jul 16 04:19:20 2008 +++ bugtracker/template/generic/bug/index.php Wed Jul 16 12:13:36 2008 @@ -68,12 +68,12 @@ $content .= '</td><td colspan="2">Opened: ' . date('d/m/Y h:i O',$bug['UNIX_TIMESTAMP(reported_on)']) . '<br />'; if ($bug['UNIX_TIMESTAMP(updated)'] != $bug['UNIX_TIMESTAMP(reported_on)']) { - $content .= 'Last Updated: ' . date('d/m/Y h:i O',$bug['UNIX_TIMESTAMP(updated)']) . '<br />';; + $content .= 'Last Updated: ' . date('d/m/Y H:i O',$bug['UNIX_TIMESTAMP(updated)']) . '<br />';; } if ($bug['status'] != 0) { $content .= 'Assigned to: <strong>' . $bug['assigned_to'] . '</strong><br />'; - $content .= 'Assigned on: ' . date('d/m/Y h:i O',$bug['UNIX_TIMESTAMP(assigned_on)']); + $content .= 'Assigned on: ' . date('d/m/Y H:i O',$bug['UNIX_TIMESTAMP(assigned_on)']); } $content .= '</td></tr>'; http://cvs.php.net/viewvc.cgi/bugtracker/template/generic/report/report.php?r1=1.3&r2=1.4&diff_format=u Index: bugtracker/template/generic/report/report.php diff -u bugtracker/template/generic/report/report.php:1.3 bugtracker/template/generic/report/report.php:1.4 --- bugtracker/template/generic/report/report.php:1.3 Fri Jul 11 13:47:16 2008 +++ bugtracker/template/generic/report/report.php Wed Jul 16 12:13:36 2008 @@ -110,9 +110,11 @@ $meta_refresh['url'] = '/bug/' . $bug->bug_id; $meta_refresh['time'] = 10; + $content .= '<div id="success">'; $content .= '<p>Your Bug has been added successfully.</p>'; $content .= '<p>You should recieve an email confirming this.</p>'; $content .= '<p>You will be redirected to your bug in ' . $meta_refresh['time'] . ' seconds or you can <a href="' . $meta_refresh['url'] .'">click here to go there</a>.</p>'; + $content .= '</div>'; // $content .= '<p>This be where some db-ness happens</p>'; } http://cvs.php.net/viewvc.cgi/bugtracker/template/generic/user/convert.php?r1=1.1&r2=1.2&diff_format=u Index: bugtracker/template/generic/user/convert.php diff -u bugtracker/template/generic/user/convert.php:1.1 bugtracker/template/generic/user/convert.php:1.2 --- bugtracker/template/generic/user/convert.php:1.1 Wed Jul 16 04:19:21 2008 +++ bugtracker/template/generic/user/convert.php Wed Jul 16 12:13:36 2008 @@ -17,17 +17,20 @@ //check valid $query = 'SELECT * FROM ' . TEMP_USER_TABLE . ' WHERE handle = \'' . $db->protect_data($temp_handle) . '\''; $db->get_data($query); -// $valid = $db->total_rows ? TRUE : FALSE; +$trace .= $query . "\n" . $db->total_rows . "\n"; + $valid = $db->total_rows ? TRUE : FALSE; //if the new handle is already in the user table.... - if ($user->fetch_handle($handle)) + if ($user->fetch_handle($user_data['handle'])) { +$trace .= 'in here'; $template_data['form_error'] = 'The handle you have selected is already in use, please select another'; $user->logged_in_temp = TRUE; $redirect_convert = FALSE; } - else if ($db->total_rows) + else if ($valid) { +$trace .= 'have rows'; $query = 'DESCRIBE ' . USER_TABLE; $db->get_data($query); $past_updated = FALSE; @@ -96,6 +99,7 @@ { //the user has been registered in the main database //what now? + //just give out a nice message, email is handle in the register function $content .= '<h2>Account Status</h2>'; $content .= '<p>Your account has begun the conversion process.</p>'; $content .= '<p>An email has been sent to you, in order for you to confirm your address.</p>'; @@ -118,6 +122,11 @@ $user->handle = $user_data['temp_handle']; } } + else + { + $template_data['form_error'] = 'You have got somewhere you should not have'; + $trace .= 'some error'; + } } //use this switch for drop through return to form, http://cvs.php.net/viewvc.cgi/bugtracker/template/php/home.html?r1=1.1&r2=1.2&diff_format=u Index: bugtracker/template/php/home.html diff -u bugtracker/template/php/home.html:1.1 bugtracker/template/php/home.html:1.2 --- bugtracker/template/php/home.html:1.1 Wed Jul 9 13:07:22 2008 +++ bugtracker/template/php/home.html Wed Jul 16 12:13:36 2008 @@ -7,6 +7,24 @@ <h2>Search the Bug System</h2> <p>You can view the current <a href="/bug/" title="View Bugs">bug listings</a> +<div id="error"> +Current Test: +<br /><br /> +Report a bug +<br /> +Press login +<br /> +Use email and bug password to login +<br /> +Change profile if you want +<br /> +Click Email link whern arrives +<br /> +Let me know of pass or fail to <a href="irc://efnet.teleglobe.net/foobared">#foobared on efnet</a> +<br /> +Also feedback on profile fields +</div> + <br /><br /><hr /> <p>The following sucks</p> http://cvs.php.net/viewvc.cgi/bugtracker/template/generic/user/verify.php?view=markup&rev=1.1 Index: bugtracker/template/generic/user/verify.php +++ bugtracker/template/generic/user/verify.php <?php //file to verify a user //this needs to verify to the normal user db in case of a password change between temp user and real user //$message .= md5( md5($dest) . '_' . md5 ($user_data['password']) ); //data grab //.htaccess was used to shunt to varible $email = loadvar('email'); $tehkey = loadvar('tehkey'); $error = TRUE; if ($email && $tehkey) { //we have everything we need to go for verify $query = 'SELECT password FROM ' . USER_TABLE . ' WHERE email = \'' . $email . '\''; $db->get_data($query); if ($db->total_rows) { //woo exists for this email add. //password is md5ed already $password = $db->fetch_row(); $password = $password['password']; $ourkey = md5( md5($email) . '_' . md5($password) ); if ($ourkey == $tehkey) { //update that database $query = 'UPDATE ' . USER_TABLE . ' SET account_type = \'' . USER . '\''; $db->get_data($query); if ($db->affected_rows) { $content .= '<div id="success">Your verify keys match for this email address'; $content .= '<br />And you account has been updated'; $content .= '<br />You should now be able to login'; $content .= '</div>'; //update user history //deregister the temp account $query = 'DELETE FROM ' . TEMP_USER_TABLE . ' WHERE email = \'' . $email . '\''; $db->get_data($query); //no result processing required :-) $error = FALSE; } } } } if ($error) { $tempate_data['form_error'] = 'For some reason, your email verification could not be completed'; } ?>
http://cvs.php.net/viewvc.cgi/bugtracker/htdocs/.htaccess?r1=1.2&r2=1.3&diff_format=u Index: bugtracker/htdocs/.htaccess diff -u bugtracker/htdocs/.htaccess:1.2 bugtracker/htdocs/.htaccess:1.3 --- bugtracker/htdocs/.htaccess:1.2 Wed Jul 16 04:19:20 2008 +++ bugtracker/htdocs/.htaccess Wed Jul 16 12:13:36 2008 @@ -15,6 +15,7 @@ #Other shuntage RewriteRule ^login/$ /user/login/ [L,PT] +RewriteRule ^user/verify/(.*)/(.*)$ index/index.php?page=user/verify&email=$1&tehkey=$2 [L,PT] #the big rewrite RewriteRule (.*)$ index/index.php?page=$1&%{QUERY_STRING} [L,PT] http://cvs.php.net/viewvc.cgi/bugtracker/htdocs/elements/screen.css?r1=1.4&r2=1.5&diff_format=u Index: bugtracker/htdocs/elements/screen.css diff -u bugtracker/htdocs/elements/screen.css:1.4 bugtracker/htdocs/elements/screen.css:1.5 --- bugtracker/htdocs/elements/screen.css:1.4 Wed Jul 16 04:19:20 2008 +++ bugtracker/htdocs/elements/screen.css Wed Jul 16 12:13:36 2008 @@ -184,4 +184,14 @@ background: #fee; color: #660000; } +#success { + clear: both; + font-size: 108%; + font-weight: bold; + padding: 1.0em !important; + border: 1px solid #006600; + margin: 1.0em !important; + background: #EEFFEE; + color: #006600; +} http://cvs.php.net/viewvc.cgi/bugtracker/htdocs/index/index.php?r1=1.6&r2=1.7&diff_format=u Index: bugtracker/htdocs/index/index.php diff -u bugtracker/htdocs/index/index.php:1.6 bugtracker/htdocs/index/index.php:1.7 --- bugtracker/htdocs/index/index.php:1.6 Wed Jul 16 04:19:20 2008 +++ bugtracker/htdocs/index/index.php Wed Jul 16 12:13:36 2008 @@ -9,11 +9,12 @@ //backtrace has something to talk too $template_data = array('backtrace' => ''); +$trace = ''; //before we start lets see if the database engine is online include($_SERVER['DOCUMENT_ROOT'] . '/config.php'); include($_SERVER['DOCUMENT_ROOT'] . '../includes/functions.php'); -$errorhandler = set_error_handler("itsanerrorhandler",E_ALL&~E_NOTICE); +$errorhandler = set_error_handler("theerrorhandler",E_ALL&~E_NOTICE); //database time $db = new db(); @@ -23,7 +24,6 @@ { //arg! were offline include($_SERVER['DOCUMENT_ROOT'] . 'offline.html'); - //header('Location: /offline.html'); exit; } @@ -78,7 +78,8 @@ 'form_error' => '', ) ); -$template_data['cvs_version'] = substr( $php_version[sizeof($php_version)] ,0,4); +//$template_data['cvs_version'] = substr( $php_version[sizeof($php_version)] ,0,4); +$template_data['cvs_version'] = substr( $php_version[sizeof($php_version)-1] ,0,4); if ($template != 'php') { $template_data['page_title'] .= ' ' . titleit($bugtracker); @@ -190,6 +191,12 @@ echo '<textarea style="width: 95%; height: 200px; border: 1px solid #000;" rows="10" cols="50">debug: ' . "\n"; echo ' +trace: +'; +echo $trace; + +echo ' + cookie '; print_r($_COOKIE); http://cvs.php.net/viewvc.cgi/bugtracker/includes/functions.php?r1=1.7&r2=1.8&diff_format=u Index: bugtracker/includes/functions.php diff -u bugtracker/includes/functions.php:1.7 bugtracker/includes/functions.php:1.8 --- bugtracker/includes/functions.php:1.7 Wed Jul 16 04:19:20 2008 +++ bugtracker/includes/functions.php Wed Jul 16 12:13:36 2008 @@ -113,60 +113,66 @@ //error control -function itsanerrorhandler($errno, $errstr, $errfile, $errline) +function theerrorhandler($errno, $errstr, $errfile, $errline) { -global $template_data; -$fail = ''; - switch ($errno) { - case E_USER_ERROR: - echo "<b>My ERROR</b> [$errno] $errstr<br />\n"; - echo " Fatal error on line $errline in file $errfile"; - echo ", PHP " . PHP_VERSION . " (" . PHP_OS . ")<br />\n"; - echo "Aborting...<br />\n"; - exit(1); - break; - - case E_USER_WARNING: - $fail = "<b>My WARNING</b> [$errno] $errstr<br />\n"; - break; - - case E_USER_NOTICE: - $fail = "<b>My NOTICE</b> [$errno] $errstr<br />\n"; - break; - - default: - $fail = "Unknown error type: [$errno] $errstr<br />\n"; - break; + global $template_data; + $fail = ''; + switch ($errno) { + case E_USER_ERROR: + echo "<b>My ERROR</b> [$errno] $errstr<br />\n"; + echo " Fatal error on line $errline in file $errfile"; + echo ", PHP " . PHP_VERSION . " (" . PHP_OS . ")<br />\n"; + echo "Aborting...<br />\n"; + exit(1); + break; + case E_USER_WARNING: + $fail = "<b>My WARNING</b> [$errno] $errstr<br />\n"; + break; + case E_USER_NOTICE: + $fail = "<b>My NOTICE</b> [$errno] $errstr<br />\n"; + break; + default: + $fail = "Unknown error type: [$errno] $errstr<br />\n"; + break; } $template_data['backtrace'] .= '<strong>' . $fail . '</strong>'; errorarray(debug_backtrace()); - $template_data['backtrace'] = '<div id="error">' . $template_data['backtrace'] . '</div>'; + $template_data['backtrace'] = '<div id="error" style="font-size: 8px;">' . $template_data['backtrace'] . '</div>'; + + $first_flag = FALSE; return; } function errorarray($array) { - global $template_data; + global $template_data,$first_flag; foreach ($array as $ref => $data) { - $template_data['backtrace'] .= '<br />'; - if (!is_numeric($ref)) - { - $template_data['backtrace'] .= $ref. ': '; - } - if (get_class($data)) - { - $template_data['backtrace'] .= get_class($data); - } - else if (is_array($data)) + if (!$first_flag) { - errorarray($data); + $first_flag = TRUE; } else { - $template_data['backtrace'] .= $data; + $template_data['backtrace'] .= '<br />'; + if (!is_numeric($ref)) + { + $template_data['backtrace'] .= $ref. ': '; + } + if (get_class($data)) + { + $template_data['backtrace'] .= get_class($data); + } + else if (is_array($data)) + { + errorarray($data); + } + else + { + $template_data['backtrace'] .= $data; + } } } http://cvs.php.net/viewvc.cgi/bugtracker/includes/user.php?r1=1.5&r2=1.6&diff_format=u Index: bugtracker/includes/user.php diff -u bugtracker/includes/user.php:1.5 bugtracker/includes/user.php:1.6 --- bugtracker/includes/user.php:1.5 Wed Jul 16 04:19:20 2008 +++ bugtracker/includes/user.php Wed Jul 16 12:13:36 2008 @@ -145,6 +145,7 @@ //this will create a user, BUT WILL NOT CHECK IT EXISTS FIRST //assumes done prior to calling this function + $temp_convert = isset($user_data['temp_handle']) ? TRUE : FALSE; $user_data['temp_handle'] = ''; unset($user_data['temp_handle']); $query = 'INSERT INTO ' . USER_TABLE . ' (' . implode(', ', array_keys($user_data)) . ', registered) VALUES ("'; @@ -163,12 +164,26 @@ { //email time $dest = $user_data['email']; - $subject = 'PHP Bugz Account Conversion'; - $message = 'You or someone else has converted your http://bugs.php.net/ Account to a full account'; + $subject = 'PHP Bugz Account'; + $message = 'You or someone else '; + if ($temp_convert) + { + $subject .= ' Conversion'; + $message .= 'has converted your http://bugs.php.net/ Account to a full account'; + } + else + { + $subject .= ' Creation'; + $message .= 'have signed up to use the phpBugtracker over at http://bugs.php.net/'; + } $message .= "\n\r" . 'In order to continue you will need to verfiy your email address'; $message .= "\n\r" . 'Click the following link, or copy and paste it into your browser'; $message .= "\n\r\n\r"; + $message .= 'http://' . $_SERVER['HTTP_HOST'] . '/user/verify/'; + $message .= $dest . '/'; + $message .= md5( md5($dest) . '_' . md5 ($user_data['password']) ); + $message .= "\n\r\n\r"; $email->send_to_user($dest,$subject,$message); http://cvs.php.net/viewvc.cgi/bugtracker/includes/cache/php_version.php?r1=1.4&r2=1.5&diff_format=u Index: bugtracker/includes/cache/php_version.php diff -u bugtracker/includes/cache/php_version.php:1.4 bugtracker/includes/cache/php_version.php:1.5 --- bugtracker/includes/cache/php_version.php:1.4 Fri Jul 11 13:14:18 2008 +++ bugtracker/includes/cache/php_version.php Wed Jul 16 12:13:36 2008 @@ -1,5 +1,5 @@ <?php - +$php_version[0] = 'Irrelevant'; $php_version[1] = "5.2.6"; $php_version[2] = "4.4.8"; $php_version[3] = "4CVS-2008-06-27 (snap)"; @@ -14,4 +14,4 @@ define(strtoupper(str_replace(' ','_',$data)),$ref); } -?> \ No newline at end of file +?> http://cvs.php.net/viewvc.cgi/bugtracker/template/generic/bug/index.php?r1=1.8&r2=1.9&diff_format=u Index: bugtracker/template/generic/bug/index.php diff -u bugtracker/template/generic/bug/index.php:1.8 bugtracker/template/generic/bug/index.php:1.9 --- bugtracker/template/generic/bug/index.php:1.8 Wed Jul 16 04:19:20 2008 +++ bugtracker/template/generic/bug/index.php Wed Jul 16 12:13:36 2008 @@ -68,12 +68,12 @@ $content .= '</td><td colspan="2">Opened: ' . date('d/m/Y h:i O',$bug['UNIX_TIMESTAMP(reported_on)']) . '<br />'; if ($bug['UNIX_TIMESTAMP(updated)'] != $bug['UNIX_TIMESTAMP(reported_on)']) { - $content .= 'Last Updated: ' . date('d/m/Y h:i O',$bug['UNIX_TIMESTAMP(updated)']) . '<br />';; + $content .= 'Last Updated: ' . date('d/m/Y H:i O',$bug['UNIX_TIMESTAMP(updated)']) . '<br />';; } if ($bug['status'] != 0) { $content .= 'Assigned to: <strong>' . $bug['assigned_to'] . '</strong><br />'; - $content .= 'Assigned on: ' . date('d/m/Y h:i O',$bug['UNIX_TIMESTAMP(assigned_on)']); + $content .= 'Assigned on: ' . date('d/m/Y H:i O',$bug['UNIX_TIMESTAMP(assigned_on)']); } $content .= '</td></tr>'; http://cvs.php.net/viewvc.cgi/bugtracker/template/generic/report/report.php?r1=1.3&r2=1.4&diff_format=u Index: bugtracker/template/generic/report/report.php diff -u bugtracker/template/generic/report/report.php:1.3 bugtracker/template/generic/report/report.php:1.4 --- bugtracker/template/generic/report/report.php:1.3 Fri Jul 11 13:47:16 2008 +++ bugtracker/template/generic/report/report.php Wed Jul 16 12:13:36 2008 @@ -110,9 +110,11 @@ $meta_refresh['url'] = '/bug/' . $bug->bug_id; $meta_refresh['time'] = 10; + $content .= '<div id="success">'; $content .= '<p>Your Bug has been added successfully.</p>'; $content .= '<p>You should recieve an email confirming this.</p>'; $content .= '<p>You will be redirected to your bug in ' . $meta_refresh['time'] . ' seconds or you can <a href="' . $meta_refresh['url'] .'">click here to go there</a>.</p>'; + $content .= '</div>'; // $content .= '<p>This be where some db-ness happens</p>'; } http://cvs.php.net/viewvc.cgi/bugtracker/template/generic/user/convert.php?r1=1.1&r2=1.2&diff_format=u Index: bugtracker/template/generic/user/convert.php diff -u bugtracker/template/generic/user/convert.php:1.1 bugtracker/template/generic/user/convert.php:1.2 --- bugtracker/template/generic/user/convert.php:1.1 Wed Jul 16 04:19:21 2008 +++ bugtracker/template/generic/user/convert.php Wed Jul 16 12:13:36 2008 @@ -17,17 +17,20 @@ //check valid $query = 'SELECT * FROM ' . TEMP_USER_TABLE . ' WHERE handle = \'' . $db->protect_data($temp_handle) . '\''; $db->get_data($query); -// $valid = $db->total_rows ? TRUE : FALSE; +$trace .= $query . "\n" . $db->total_rows . "\n"; + $valid = $db->total_rows ? TRUE : FALSE; //if the new handle is already in the user table.... - if ($user->fetch_handle($handle)) + if ($user->fetch_handle($user_data['handle'])) { +$trace .= 'in here'; $template_data['form_error'] = 'The handle you have selected is already in use, please select another'; $user->logged_in_temp = TRUE; $redirect_convert = FALSE; } - else if ($db->total_rows) + else if ($valid) { +$trace .= 'have rows'; $query = 'DESCRIBE ' . USER_TABLE; $db->get_data($query); $past_updated = FALSE; @@ -96,6 +99,7 @@ { //the user has been registered in the main database //what now? + //just give out a nice message, email is handle in the register function $content .= '<h2>Account Status</h2>'; $content .= '<p>Your account has begun the conversion process.</p>'; $content .= '<p>An email has been sent to you, in order for you to confirm your address.</p>'; @@ -118,6 +122,11 @@ $user->handle = $user_data['temp_handle']; } } + else + { + $template_data['form_error'] = 'You have got somewhere you should not have'; + $trace .= 'some error'; + } } //use this switch for drop through return to form, http://cvs.php.net/viewvc.cgi/bugtracker/template/php/home.html?r1=1.1&r2=1.2&diff_format=u Index: bugtracker/template/php/home.html diff -u bugtracker/template/php/home.html:1.1 bugtracker/template/php/home.html:1.2 --- bugtracker/template/php/home.html:1.1 Wed Jul 9 13:07:22 2008 +++ bugtracker/template/php/home.html Wed Jul 16 12:13:36 2008 @@ -7,6 +7,24 @@ <h2>Search the Bug System</h2> <p>You can view the current <a href="/bug/" title="View Bugs">bug listings</a> +<div id="error"> +Current Test: +<br /><br /> +Report a bug +<br /> +Press login +<br /> +Use email and bug password to login +<br /> +Change profile if you want +<br /> +Click Email link whern arrives +<br /> +Let me know of pass or fail to <a href="irc://efnet.teleglobe.net/foobared">#foobared on efnet</a> +<br /> +Also feedback on profile fields +</div> + <br /><br /><hr /> <p>The following sucks</p> http://cvs.php.net/viewvc.cgi/bugtracker/template/generic/user/verify.php?view=markup&rev=1.1 Index: bugtracker/template/generic/user/verify.php +++ bugtracker/template/generic/user/verify.php <?php //file to verify a user //this needs to verify to the normal user db in case of a password change between temp user and real user //$message .= md5( md5($dest) . '_' . md5 ($user_data['password']) ); //data grab //.htaccess was used to shunt to varible $email = loadvar('email'); $tehkey = loadvar('tehkey'); $error = TRUE; if ($email && $tehkey) { //we have everything we need to go for verify $query = 'SELECT password FROM ' . USER_TABLE . ' WHERE email = \'' . $email . '\''; $db->get_data($query); if ($db->total_rows) { //woo exists for this email add. //password is md5ed already $password = $db->fetch_row(); $password = $password['password']; $ourkey = md5( md5($email) . '_' . md5($password) ); if ($ourkey == $tehkey) { //update that database $query = 'UPDATE ' . USER_TABLE . ' SET account_type = \'' . USER . '\''; $db->get_data($query); if ($db->affected_rows) { $content .= '<div id="success">Your verify keys match for this email address'; $content .= '<br />And you account has been updated'; $content .= '<br />You should now be able to login'; $content .= '</div>'; //update user history //deregister the temp account $query = 'DELETE FROM ' . TEMP_USER_TABLE . ' WHERE email = \'' . $email . '\''; $db->get_data($query); //no result processing required :-) $error = FALSE; } } } } if ($error) { $tempate_data['form_error'] = 'For some reason, your email verification could not be completed'; } ?>