cvs: pearweb /include layout.php pear-prepend.php
| From: | Stig Bakken | Date: | Sun, 29 Jul 2001 00:44:29 +0000 |
| Subject: | cvs: pearweb /include layout.php pear-prepend.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-358@lists.php.net to get a copy of this message | ||
ssb Sat Jul 28 20:44:29 2001 EDT
Modified files:
/pearweb/include pear-prepend.php layout.php
Log:
* fix some issues caught by E_ALL
Index: pearweb/include/pear-prepend.php
diff -u pearweb/include/pear-prepend.php:1.11 pearweb/include/pear-prepend.php:1.12
--- pearweb/include/pear-prepend.php:1.11 Wed May 9 10:51:31 2001
+++ pearweb/include/pear-prepend.php Sat Jul 28 20:44:29 2001
@@ -6,24 +6,20 @@
require_once "pear-auth.php";
require_once "pear-database.php";
-if (empty($format) && basename($PHP_SELF) == "xmlrpc.php") {
- $format = "xmlrpc";
-}
+error_reporting(E_ALL);
-switch ($format) {
- case "xmlrpc":
- break;
- case "html":
- break;
- default:
- $format = "html";
- break;
+if (empty($format)) {
+ if (basename($PHP_SELF) == "xmlrpc.php") {
+ $format = "xmlrpc";
+ } else {
+ $format = "html";
+ }
}
include_once "pear-format-$format.php";
PEAR::setErrorHandling(PEAR_ERROR_CALLBACK, "error_handler");
-if ($SERVER_NAME != 'pear.php.net' && !is_object($dbh)) {
+if ($SERVER_NAME != 'pear.php.net' && empty($dbh)) {
$dbh = DB::connect(PEAR_DATABASE_DSN, array('persistent' => true));
}
Index: pearweb/include/layout.php
diff -u pearweb/include/layout.php:1.8 pearweb/include/layout.php:1.9
--- pearweb/include/layout.php:1.8 Sat May 12 07:03:15 2001
+++ pearweb/include/layout.php Sat Jul 28 20:44:29 2001
@@ -1,5 +1,5 @@
<?php
-/* $Id: layout.php,v 1.8 2001/05/12 11:03:15 mj Exp $ */
+/* $Id: layout.php,v 1.9 2001/07/29 00:44:29 ssb Exp $ */
require_once 'site.php';
@@ -151,7 +151,7 @@
#
function commonHeader($title) {
- global $SIDEBAR_DATA;
+ global $SIDEBAR_DATA, $HTTP_SERVER_VARS;
?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
@@ -186,7 +186,7 @@
<td align="right" valign="bottom">
<?php
- if ($HTTP_SERVER_VARS['PHP_AUTH_USER']) {
+ if (isset($HTTP_SERVER_VARS['PHP_AUTH_USER'])) {
print_link('/logout.php', 'logout', false,
'class="menuBlack"');
} else {
print_link('/login.php', 'login', false,
'class="menuBlack"');