[geeklog-cvs] geeklog: Added a header comment block to a function COM_createHT...

geeklog-cvs at lists.geeklog.net geeklog-cvs at lists.geeklog.net
Mon Apr 23 19:08:19 EDT 2012


changeset 8612:afe822b520b0
url:  http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/afe822b520b0
user: dengen
date: Mon Apr 23 01:28:46 2012 +0900
description:
Added a header comment block to a function COM_createHTMLDocument
Modified from CRLF to LF

diffstat:

 public_html/lib-common.php |  16838 +++++++++++++++++++++---------------------
 1 files changed, 8426 insertions(+), 8412 deletions(-)

diffs (truncated from 16842 to 300 lines):

diff -r 06d4b6cb0af2 -r afe822b520b0 public_html/lib-common.php
--- a/public_html/lib-common.php	Thu Apr 19 18:55:13 2012 +0900
+++ b/public_html/lib-common.php	Mon Apr 23 01:28:46 2012 +0900
@@ -1,8412 +1,8426 @@
-<?php
-
-/* Reminder: always indent with 4 spaces (no tabs). */
-// +---------------------------------------------------------------------------+
-// | Geeklog 1.8                                                               |
-// +---------------------------------------------------------------------------+
-// | lib-common.php                                                            |
-// |                                                                           |
-// | Geeklog common library.                                                   |
-// +---------------------------------------------------------------------------+
-// | Copyright (C) 2000-2011 by the following authors:                         |
-// |                                                                           |
-// | Authors: Tony Bibbs        - tony AT tonybibbs DOT com                    |
-// |          Mark Limburg      - mlimburg AT users DOT sourceforge DOT net    |
-// |          Jason Whittenburg - jwhitten AT securitygeeks DOT com            |
-// |          Dirk Haun         - dirk AT haun-online DOT de                   |
-// |          Vincent Furia     - vinny01 AT users DOT sourceforge DOT net     |
-// +---------------------------------------------------------------------------+
-// |                                                                           |
-// | This program is free software; you can redistribute it and/or             |
-// | modify it under the terms of the GNU General Public License               |
-// | as published by the Free Software Foundation; either version 2            |
-// | of the License, or (at your option) any later version.                    |
-// |                                                                           |
-// | This program is distributed in the hope that it will be useful,           |
-// | but WITHOUT ANY WARRANTY; without even the implied warranty of            |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the             |
-// | GNU General Public License for more details.                              |
-// |                                                                           |
-// | You should have received a copy of the GNU General Public License         |
-// | along with this program; if not, write to the Free Software Foundation,   |
-// | Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.           |
-// |                                                                           |
-// +---------------------------------------------------------------------------+
-
-// Prevent PHP from reporting uninitialized variables
-error_reporting(E_ERROR | E_WARNING | E_PARSE | E_COMPILE_ERROR | E_USER_ERROR);
-
-/**
-* This is the common library for Geeklog.  Through our code, you will see
-* functions with the COM_ prefix (e.g. COM_siteHeader()).  Any such functions
-* can be found in this file.
-*
-* --- You don't need to modify anything in this file! ---
-*
-* WARNING: put any custom hacks in lib-custom.php and not in here.  This file is
-* modified frequently by the Geeklog development team.  If you put your hacks in
-* lib-custom.php you will find upgrading much easier.
-*
-*/
-
-/**
-* Turn this on to get various debug messages from the code in this library
-* @global Boolean $_COM_VERBOSE
-*/
-$_COM_VERBOSE = false;
-
-/**
-* Prevent getting any surprise values. But we should really stop
-* using $_REQUEST altogether.
-*/
-$_REQUEST = array_merge($_GET, $_POST);
-
-/**
-* Here, we shall establish an error handler. This will mean that whenever a
-* php level error is encountered, our own code handles it. This will hopefuly
-* go someway towards preventing nasties like path exposures from ever being
-* possible. That is, unless someone has overridden our error handler with one
-* with a path exposure issue...
-*
-* Must make sure that the function hasn't been disabled before calling it.
-*
-*/ 
-if (function_exists('set_error_handler')) {
-    /* Tell the error handler to use the default error reporting options.
-     * You may like to change this to use it in more/less cases, if so,
-     * just use the syntax used in the call to error_reporting() above.
-     */
-    $defaultErrorHandler = set_error_handler('COM_handleError',
-                                             error_reporting());
-}
-
-/**
-* Configuration Include:
-* You do NOT need to modify anything here any more!
-*/
-require_once 'siteconfig.php';
-
-COM_checkInstalled();
-
-/**
-* Configuration class
-*/
-require_once $_CONF['path_system'] . 'classes/config.class.php';
-
-$config =& config::get_instance();
-$config->set_configfile($_CONF['path'] . 'db-config.php');
-$config->load_baseconfig();
-$config->initConfig();
-
-$_CONF = $config->get_config('Core');
-
-// Get features that has ft_name like 'config%'
-$_CONF_FT = $config->_get_config_features();
-
-// Before we do anything else, check to ensure site is enabled
-
-if (isset($_CONF['site_enabled']) && !$_CONF['site_enabled']) {
-
-    if (empty($_CONF['site_disabled_msg'])) {
-        header("HTTP/1.1 503 Service Unavailable");
-        header("Status: 503 Service Unavailable");
-        header('Content-Type: text/plain; charset=' . COM_getCharset());
-        echo $_CONF['site_name'] . ' is temporarily down.  Please check back soon.' . LB;
-    } else {
-        // if the msg starts with http: assume it's a URL we should redirect to
-        if (preg_match("/^(https?):/", $_CONF['site_disabled_msg']) === 1) {
-            echo COM_refresh($_CONF['site_disabled_msg']);
-        } else {
-            header("HTTP/1.1 503 Service Unavailable");
-            header("Status: 503 Service Unavailable");
-            header('Content-Type: text/html; charset=' . COM_getCharset());
-            echo $_CONF['site_disabled_msg'] . LB;
-        }
-    }
-
-    exit;
-}
-
-// this file can't be used on its own - redirect to index.php
-if (strpos(strtolower($_SERVER['PHP_SELF']), 'lib-common.php') !== false) {
-    echo COM_refresh($_CONF['site_url'] . '/index.php');
-    exit;
-}
-
-
-// +---------------------------------------------------------------------------+
-// | Library Includes: You shouldn't have to touch anything below here         |
-// +---------------------------------------------------------------------------+
-
-/**
-* If needed, add our PEAR path to the list of include paths
-*
-*/
-if (! $_CONF['have_pear']) {
-    $curPHPIncludePath = get_include_path();
-    if (empty($curPHPIncludePath)) {
-        $curPHPIncludePath = $_CONF['path_pear'];
-    } else {
-        $curPHPIncludePath = $_CONF['path_pear'] . PATH_SEPARATOR
-                           . $curPHPIncludePath;
-    }
-
-    if (set_include_path($curPHPIncludePath) === false) {
-        COM_errorLog('set_include_path failed - there may be problems using the PEAR classes.', 1);
-    }
-}
-
-/**
-* Set the webserver's timezone
-*/
-
-require_once $_CONF['path_system'] . 'classes/timezoneconfig.class.php';
-TimeZoneConfig::setSystemTimeZone();
-
-/**
-* Include plugin class.
-* This is a poorly implemented class that was not very well thought out.
-* Still very necessary
-*
-*/
-
-require_once( $_CONF['path_system'] . 'lib-plugins.php' );
-
-/**
-* Include page time -- used to time how fast each page was created
-*
-*/
-
-require_once( $_CONF['path_system'] . 'classes/timer.class.php' );
-$_PAGE_TIMER = new timerobject();
-$_PAGE_TIMER->startTimer();
-
-/**
-* Include URL class
-*
-* This provides optional URL rewriting functionality.
-*/
-
-require_once( $_CONF['path_system'] . 'classes/url.class.php' );
-$_URL = new url( $_CONF['url_rewrite'] );
-
-/**
-* This is our HTML template class.  It is the same one found in PHPLib and is
-* licensed under the LGPL.  See that file for details.
-*
-*/
-
-require_once( $_CONF['path_system'] . 'classes/template.class.php' );
-
-/**
-* This is the security library used for application security
-*
-*/
-
-require_once( $_CONF['path_system'] . 'lib-security.php' );
-
-/**
-* This is the syndication library used to offer (RSS) feeds.
-*
-*/
-
-require_once( $_CONF['path_system'] . 'lib-syndication.php' );
-
-/**
-* This is the topic library used to manage topics.
-*
-*/
-
-require_once( $_CONF['path_system'] . 'lib-topic.php' );
-
-/**
-* Retrieve new topic or get last topic.
-*
-*/
-
-if (isset($_GET['topic'])) {
-    $topic = COM_applyFilter( $_GET['topic'] );
-} elseif (isset( $_POST['topic'])) {
-    $topic = COM_applyFilter( $_POST['topic'] );
-} else {
-    $topic = '';
-}
-
-/**
-* This is the block library used to manage blocks.
-*
-*/
-
-require_once( $_CONF['path_system'] . 'lib-block.php' );
-
-/**
- *These variables were taken out of the configuration and placed here since they
- *are necessary to change with the themes, not whole sites. They should now be
- *overridden by setting them to a different value than here in the theme's
- *function.php or in lib-custom.php. Therefore they are NOT TO BE CHANGED HERE.
- */
-$_CONF['left_blocks_in_footer'] = 0;  // use left blocks in header
-$_CONF['right_blocks_in_footer'] = 1;  // use right blocks in footer
-
-/**
-* This is the custom library.
-*
-* It is the sandbox for every Geeklog Admin to play in.
-* The lib-custom.php as shipped will never contain required code,
-* so it's safe to always use your own copy.
-* This should hold all custom hacks to make upgrading easier.
-*
-*/
-
-require_once( $_CONF['path_system'] . 'lib-custom.php' );
-
-/**
-* Session management library
-*
-*/
-
-require_once( $_CONF['path_system'] . 'lib-sessions.php' );
-TimeZoneConfig::setUserTimeZone();
-
-if (COM_isAnonUser()) {
-    $_USER['advanced_editor'] = $_CONF['advanced_editor'];
-}
-
-
-/**
-* Ulf Harnhammar's kses class
-*
-*/
-
-require_once( $_CONF['path_system'] . 'classes/kses.class.php' );
-
-/**
-* Multibyte functions
-*
-*/
-require_once( $_CONF['path_system'] . 'lib-mbyte.php' );
-
-/**
-* Include the Scripts class
-*
-* This provides the ability to set css and javascript.
-*/
-
-require_once( $_CONF['path_system'] . 'classes/scripts.class.php' );
-$_SCRIPTS = new scripts();



More information about the geeklog-cvs mailing list