[geeklog-cvs] Geeklog-1.x/public_html lib-common.php,1.709,1.710

Dirk Haun dhaun at qs1489.pair.com
Sun Jul 6 16:18:24 EDT 2008


Update of /cvsroot/geeklog/Geeklog-1.x/public_html
In directory qs1489.pair.com:/tmp/cvs-serv61811/public_html

Modified Files:
	lib-common.php 
Log Message:
Minor improvements in the error handling


Index: lib-common.php
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/public_html/lib-common.php,v
retrieving revision 1.709
retrieving revision 1.710
diff -C2 -d -r1.709 -r1.710
*** lib-common.php	4 Jul 2008 18:19:43 -0000	1.709
--- lib-common.php	6 Jul 2008 20:18:22 -0000	1.710
***************
*** 1931,1934 ****
--- 1931,1938 ----
          $timestamp = strftime( '%c' );
  
+         if (!isset($_CONF['path_log']) && ($actionid != 2)) {
+             $actionid = 3;
+         }
+ 
          switch( $actionid )
          {
***************
*** 1946,1950 ****
                  break;
  
!            case 2:
                  $retval .= COM_startBlock( $LANG01[55] . ' ' . $timestamp, '',
                                 COM_getBlockTemplate( '_msg_block', 'header' ))
--- 1950,1954 ----
                  break;
  
!             case 2:
                  $retval .= COM_startBlock( $LANG01[55] . ' ' . $timestamp, '',
                                 COM_getBlockTemplate( '_msg_block', 'header' ))
***************
*** 1954,1957 ****
--- 1958,1965 ----
                  break;
  
+             case 3:
+                 $retval = nl2br($logentry);
+                 break;
+ 
              default:
                  $logfile = $_CONF['path_log'] . 'error.log';
***************
*** 6475,6479 ****
       * If we have a root user, then output detailed error message:
       */
!     if( ( is_array($_USER) && function_exists('SEC_inGroup') ) || $_CONF['rootdebug'] )
      {
          if($_CONF['rootdebug'] || SEC_inGroup('Root'))
--- 6483,6487 ----
       * If we have a root user, then output detailed error message:
       */
!     if( ( is_array($_USER) && function_exists('SEC_inGroup') ) || (isset($_CONF['rootdebug']) && $_CONF['rootdebug']) )
      {
          if($_CONF['rootdebug'] || SEC_inGroup('Root'))
***************
*** 6501,6505 ****
          if( array_key_exists('path_system', $_CONF) )
          {
!             require_once($_CONF['path_system'].'lib-custom.php');
              if( function_exists('CUSTOM_handleError') )
              {
--- 6509,6515 ----
          if( array_key_exists('path_system', $_CONF) )
          {
!             if (file_exists($_CONF['path_system'].'lib-custom.php')) {
!                 require_once($_CONF['path_system'].'lib-custom.php');
!             }
              if( function_exists('CUSTOM_handleError') )
              {
***************
*** 6514,6527 ****
  
      /* Does the theme implement an error message html file? */
!     if(file_exists($_CONF['path_layout'].'errormessage.html'))
!     {
          // NOTE: NOT A TEMPLATE! JUST HTML!
!         include($_CONF['path_layout'].'errormessage.html');
      } else {
          /* Otherwise, display simple error message */
          echo("
          <html>
              <head>
!                 <title>{$_CONF['site_name']} - An Error Occurred</title>
              </head>
              <body>
--- 6524,6541 ----
  
      /* Does the theme implement an error message html file? */
!     if (!empty($_CONF['path_layout']) &&
!             file_exists($_CONF['path_layout'] . 'errormessage.html')) {
          // NOTE: NOT A TEMPLATE! JUST HTML!
!         include $_CONF['path_layout'] . 'errormessage.html';
      } else {
          /* Otherwise, display simple error message */
+         $title = "An Error Occurred";
+         if (!empty($_CONF['site_name'])) {
+             $title = $_CONF['site_name'] . ' - ' . $title;
+         }
          echo("
          <html>
              <head>
!                 <title>{$title}</title>
              </head>
              <body>




More information about the geeklog-cvs mailing list