Index: bugs/include/format-html.php
===================================================================
--- bugs/include/format-html.php (revision 284454)
+++ bugs/include/format-html.php (working copy)
@@ -24,6 +24,9 @@
if (empty($dbh))
{
$dbh = MDB2::factory(PEAR_DATABASE_DSN);
+ if (PEAR::isError($dbh)) {
+ trigger_error($dbh->message." [".$dbh->userinfo."]", E_USER_ERROR);
+ }
$dbh->loadModule('Extended');
}
@@ -121,7 +124,7 @@
@@ -887,7 +890,7 @@
function make_image($file, $alt = '', $align = '', $extras = '', $dir = '', $border = 0, $styles = '')
{
global $basedir, $main_include_path;
-
+
if (!$dir) {
$dir = '/gifs';
$img_dir = "{$basedir}/gifs";
@@ -951,7 +954,7 @@
function make_ticket_links($text)
{
global $site_url, $basedir, $site_data;
-
+
// PHP
$url = "{$site_data['php']['url']}{$site_data['php']['basedir']}";
$text = preg_replace('/(?<=php)\s*(bug(?:fix)?|feat(?:ure)?|doc(?:umentation)?|req(?:uest)?)\s+#?([0-9]+)/i',
Index: bugs/include/functions.inc
===================================================================
--- bugs/include/functions.inc (revision 284454)
+++ bugs/include/functions.inc (working copy)
@@ -74,7 +74,7 @@
* DEFINE FUNCTIONS ============================
*/
-/**
+/**
* Authentication
*/
function bugs_authenticate (&$user, &$pw, &$logged_in, &$is_trusted_developer)
@@ -100,29 +100,29 @@
}
$pw = $_POST['pw'];
- // Remember password / user next time
+ // Remember password / user next time
if (isset($_POST['save'])) { # non-developers don't have $user set
setcookie('MAGIC_COOKIE', base64_encode("{$user}:{$pw}"), time() + 3600 * 24 * 12, '/','.php.net');
}
} elseif (isset($auth_user) && is_object($auth_user) && $auth_user->handle) {
- $user = $auth_user->handle;
+ $user = $auth_user->handle;
$pw = $auth_user->password;
} elseif (isset($_COOKIE['MAGIC_COOKIE'])) {
@list($user, $pw) = explode(':', base64_decode($_COOKIE['MAGIC_COOKIE']));
if ($pw === null) {
$pw = '';
- }
+ }
}
// Authentication and user level check
- // User levels are: reader (0), commenter/patcher/etc. (edit = 3), submitter (edit = 2), developer (edit = 1)
+ // User levels are: reader (0), commenter/patcher/etc. (edit = 3), submitter (edit = 2), developer (edit = 1)
switch ($site)
{
case 'php':
// Only used for bugs.php.net
require_once 'cvs-auth.inc';
if ($user != '' && $pw != '' && verify_cvs_password($user, $pw)) {
- $logged_in = 'developer';
+ $logged_in = 'developer';
$auth_user->handle = $user;
$auth_user->email = "{$user}@php.net";
$auth_user->name = $user;
@@ -523,7 +523,7 @@
if ($current == $v[0]) {
echo ' selected="selected"';
}
-
+
echo ' value = "' . htmlspecialchars($v[0]) . '">' . htmlspecialchars($v[0]) . ' (' . htmlspecialchars($v[1]) . ")\n";
}
echo '