# HG changeset patch # User Dan # Date 1188745257 14400 # Node ID e3d7322305bf5b1b4b45735ad0cc371c606836f1 # Parent eb9ed4c366d0663ba1dd67244d3821489676c318 Merging Scribus and Nighthawk branches diff -r eb9ed4c366d0 -r e3d7322305bf plugins/PunBB.php --- a/plugins/PunBB.php Sun Sep 02 10:56:36 2007 -0400 +++ b/plugins/PunBB.php Sun Sep 02 11:00:57 2007 -0400 @@ -36,9 +36,9 @@ $plugins->attachHook('session_started', ' $pid = RenderMan::strToPageId($paths->get_pageid_from_url()); - if ( getConfig("punbb_installed") == "yes" && getConfig("punbb_version") == PUNANO_VERSION && preg_match("#^Forum(/.*)?$#", $pid[0]) && $pid[1] == "Special" ) + if ( getConfig("punbb_installed") == "yes" && getConfig("punbb_version") == PUNANO_VERSION && $pid[0] == "Forum" && $pid[1] == "Special" ) { - require( ENANO_ROOT . "/punbb/include/common.php" ); + require( "punbb/include/common.php" ); } '); @@ -204,7 +204,7 @@ function punano_upgrade() { global $db, $session, $paths, $template, $plugins; // Common objects - die('Punano upgrade was requested but this isn\'t implemented yet.'); + } function punano_main() @@ -261,8 +261,7 @@ if ( $session->auth_level < $need_level ) { - $need_level = ( $session->user_level > $need_level ) ? $session->user_level : $need_level; - redirect( makeUrlNS('Special', 'Login/' . $paths->fullpage, 'level=' . $need_level, false), 'Permission denied', 'You need to have permission level ' . $session->userlevel_to_string($need_level) . ' to use the PunBB administration console.', 2); + redirect( makeUrlNS('Special', 'Login/' . $paths->fullpage, 'level=' . $session->user_level, false), 'Permission denied', 'You need to have permission level ' . $session->userlevel_to_string($need_level) . ' to use the PunBB administration console.', 2); } // Don't worry. This is sanitized. diff -r eb9ed4c366d0 -r e3d7322305bf punbb/delete.php --- a/punbb/delete.php Sun Sep 02 10:56:36 2007 -0400 +++ b/punbb/delete.php Sun Sep 02 11:00:57 2007 -0400 @@ -70,7 +70,7 @@ if (isset($_POST['delete'])) { if ($is_admmod) - confirm_referrer('delete.php'); + confirm_referrer('delete'); require PUN_ROOT.'include/search_idx.php'; diff -r eb9ed4c366d0 -r e3d7322305bf punbb/include/common.php --- a/punbb/include/common.php Sun Sep 02 10:56:36 2007 -0400 +++ b/punbb/include/common.php Sun Sep 02 11:00:57 2007 -0400 @@ -23,11 +23,11 @@ ************************************************************************/ // Enable DEBUG mode by removing // from the following line -// define('PUN_DEBUG', 1); +//define('PUN_DEBUG', 1); // This displays all executed queries in the page footer. // DO NOT enable this in a production environment! -// define('PUN_SHOW_QUERIES', 1); +//define('PUN_SHOW_QUERIES', 1); if (!defined('PUN_ROOT')) exit('The constant PUN_ROOT must be defined and point to a valid PunBB installation root directory.'); @@ -47,14 +47,13 @@ // Record the start time (will be used to calculate the generation time for the page) -function pun_microtime() +function get_microtime() { list($usec, $sec) = explode(' ', microtime()); return ((float)$usec + (float)$sec); } -$GLOBALS['pun_start'] = pun_microtime(); -$pun_start =& $GLOBALS['pun_start']; +$pun_start = get_microtime(); // Make sure PHP reports all errors except E_NOTICE. PunBB supports E_ALL, but a lot of scripts it may interact with, do not. error_reporting(E_ALL); diff -r eb9ed4c366d0 -r e3d7322305bf punbb/include/functions.php --- a/punbb/include/functions.php Sun Sep 02 10:56:36 2007 -0400 +++ b/punbb/include/functions.php Sun Sep 02 11:00:57 2007 -0400 @@ -241,19 +241,19 @@ global $db, $session, $paths, $template, $plugins; // Common objects // Index and Userlist should always be displayed - $links[] = '