# HG changeset patch
# User Dan
# Date 1196721385 18000
# Node ID a007145a0ff6745f81259a9feddb0022fa2aa655
# Parent a1ccf990db6ba341b06a04151af8a3ff2da9bb46
Deprecated debugConsole and removed all calls to it. Added a lot of comments to common.php. Added support for "anonymous pages" that are created when the Enano API is loaded from an external script. Fixed missing border-bottom on Type 2 sidebar blocks in Oxygen.
diff -r a1ccf990db6b -r a007145a0ff6 ajax.php
--- a/ajax.php Sat Dec 01 02:39:49 2007 -0500
+++ b/ajax.php Mon Dec 03 17:36:25 2007 -0500
@@ -12,6 +12,8 @@
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
*/
+ define('ENANO_INTERFACE_AJAX', '');
+
// fillusername should be done without the help of the rest of Enano - all we need is the DBAL
if ( isset($_GET['_mode']) && $_GET['_mode'] == 'fillusername' )
{
diff -r a1ccf990db6b -r a007145a0ff6 includes/common.php
--- a/includes/common.php Sat Dec 01 02:39:49 2007 -0500
+++ b/includes/common.php Mon Dec 03 17:36:25 2007 -0500
@@ -11,8 +11,17 @@
* 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 details.
*/
+
+/**
+ * The main loader script that initializes everything about Enano in the proper order. Prepare to get
+ * redirected if you don't have $_GET['title'] or $_SERVER['PATH_INFO'] set up.
+ * @package Enano
+ * @subpackage Core
+ * @copyright See header block
+ */
-if(isset($_REQUEST['GLOBALS']))
+// Make sure we don't have an attempt to inject globals (register_globals on)
+if ( isset($_REQUEST['GLOBALS']) )
{
?>
Hacking AttemptHacking attempt using PHP $GLOBALS overwrite vulnerability detected, reported to admin
You're worse than this guy! Unless you are this guy...
',
- 'openPopup' => 'debugConsole = window.open',
- 'closePopup' => 'debugConsole.close()',
- 'write' => 'debugConsole.document.write',
- 'scroll' => 'debugConsole.scrollBy',
- 'focus' => 'debugConsole.focus()'
-);
-
-/**
- * html snippets, do not touch!
- */
-$_debugConsoleConfig['html'] = array (
- 'header' => '
-
-
-
- debugConsole
-
-
-
-
- ',
- 'footer' => ''
-);
-?>
\ No newline at end of file
diff -r a1ccf990db6b -r a007145a0ff6 includes/debugger/debugConsole.functions.php
--- a/includes/debugger/debugConsole.functions.php Sat Dec 01 02:39:49 2007 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,126 +0,0 @@
-
- * @see
- * @version 1.0.0
- * @package debugConsole_1.2.1
- */
-
-/**
- * show debug info of a variable in debugConsole,
- * add own text for documentation or hints
- *
- * @param mixed $variable
- * @param string $text
- */
-function dc_dump($variable, $text) {
- if(!defined('ENANO_DEBUG')) return false;
- $debugConsole = debugConsoleLoader();
-
- if (is_object($debugConsole)) {
- $debugConsole->dump($variable, $text);
- }
-}
-
-/**
- * watch value changes of a variable in debugConsole
- *
- * @param string $variableName
- */
-function dc_watch($variableName) {
- if(!defined('ENANO_DEBUG')) return false;
- $debugConsole = debugConsoleLoader();
-
- if (is_object($debugConsole)) {
- $debugConsole->watchVariable($variableName);
- }
-}
-
-/**
- * show checkpoint info in debugConsole to make sure
- * that a certain program line has been passed
- *
- * @param string $message
- */
-function dc_here($message = NULL) {
- if(!defined('ENANO_DEBUG')) return false;
- $debugConsole = debugConsoleLoader();
-
- if (is_object($debugConsole)) {
- (bool)$message ? $debugConsole->passedCheckpoint($message) : $debugConsole->passedCheckpoint();
- }
-}
-
-/**
- * starts a new timer clock and returns its handle
- *
- * @return mixed
- * @param string $comment
- */
-function dc_start_timer($comment) {
- if(!defined('ENANO_DEBUG')) return false;
- $debugConsole = debugConsoleLoader();
-
- if (is_object($debugConsole)) {
- return $debugConsole->startTimer($comment);
- }
-}
-
-/**
- * stops and shows a certain timer clock in debugConsole
- *
- * @return bool
- * @param string $timerHandle
- */
-function dc_stop_timer($timerHandle) {
- if(!defined('ENANO_DEBUG')) return false;
- $debugConsole = debugConsoleLoader();
-
- if (is_object($debugConsole)) {
- return $debugConsole->stopTimer($timerHandle);
- }
-}
-
-/**
- * singleton loader for debugConsole
- * DO NOT USE, private to debugConsole functions
- *
- * @return mixed
- */
-function debugConsoleLoader() {
- static $debugConsole;
- static $access = 'unset';
-
- $config = $GLOBALS['_debugConsoleConfig'];
-
- /* obey access restrictions */
- if (gettype($access) != 'bool') {
- if ($config['active']) {
- if ($config['restrictions']['restrictAccess']) {
- if (in_array($_SERVER['REMOTE_ADDR'], $config['restrictions']['allowedClientAdresses'])) {
- $access = TRUE;
- } else {
- $access = FALSE;
- }
- } else {
- $access = TRUE;
- }
- } else {
- $access = FALSE;
- }
- }
-
- /* access granted */
- if ($access) {
- if (!is_object($debugConsole)) {
- $debugConsole = new debugConsole();
- }
- } else {
- $debugConsole = FALSE;
- }
-
- return $debugConsole;
-}
-?>
\ No newline at end of file
diff -r a1ccf990db6b -r a007145a0ff6 includes/debugger/debugConsole.php
--- a/includes/debugger/debugConsole.php Sat Dec 01 02:39:49 2007 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,16 +0,0 @@
-
- * @see
- * @version 1.0.0
- * @package debugConsole_1.2.1
- */
-
-$path = dirname(__FILE__) . '/';
-
-require_once $path . 'debugConsole.config.php';
-require_once $path . 'debugConsole.class.php';
-require_once $path . 'debugConsole.functions.php';
-?>
\ No newline at end of file
diff -r a1ccf990db6b -r a007145a0ff6 includes/functions.php
--- a/includes/functions.php Sat Dec 01 02:39:49 2007 -0500
+++ b/includes/functions.php Mon Dec 03 17:36:25 2007 -0500
@@ -477,8 +477,6 @@
if ( ob_get_status() )
ob_end_clean();
- dc_here('functions: calling die_semicritical');
-
$tpl = new template_nodb();
$tpl->load_theme('oxygen', 'bleu');
$tpl->tpl_strings['SITE_NAME'] = getConfig('site_name');
@@ -505,7 +503,6 @@
if ( ob_get_status() )
ob_end_clean();
- dc_here('functions: calling die_friendly');
$paths->cpage['name'] = $t;
$template->tpl_strings['PAGE_NAME'] = $t;
$template->header();
@@ -535,7 +532,6 @@
if ( ob_get_status() )
ob_end_clean();
- dc_here('functions: calling grinding_halt');
$tpl = new template_nodb();
$tpl->load_theme('oxygen', 'bleu');
$tpl->tpl_strings['SITE_NAME'] = 'Critical error';
diff -r a1ccf990db6b -r a007145a0ff6 includes/paths.php
--- a/includes/paths.php Sat Dec 01 02:39:49 2007 -0500
+++ b/includes/paths.php Mon Dec 03 17:36:25 2007 -0500
@@ -18,7 +18,7 @@
*/
class pathManager {
- var $pages, $custom_page, $cpage, $page, $fullpage, $page_exists, $namespace, $nslist, $admin_tree, $wiki_mode, $page_protected, $template_cache;
+ var $pages, $custom_page, $cpage, $page, $fullpage, $page_exists, $namespace, $nslist, $admin_tree, $wiki_mode, $page_protected, $template_cache, $anonymous_page;
function __construct()
{
global $db, $session, $paths, $template, $plugins; // Common objects
@@ -26,8 +26,6 @@
$GLOBALS['paths'] =& $this;
$this->pages = Array();
- dc_here('paths: setting up namespaces, admin nodes');
-
// DEFINE NAMESPACES HERE
// The key names should NOT EVER be changed, or Enano will be very broken
$this->nslist = Array(
@@ -110,8 +108,6 @@
{
global $db, $session, $paths, $template, $plugins; // Common objects
- dc_here('paths: selecting master page data');
-
$code = $plugins->setHook('paths_init_before');
foreach ( $code as $cmd )
{
@@ -152,115 +148,145 @@
}
$db->free_result();
- dc_here('paths: determining page ID');
- if( isset($_GET['title']) )
+ if ( defined('ENANO_INTERFACE_INDEX') || defined('ENANO_INTERFACE_AJAX') )
{
- if ( $_GET['title'] == '' && getConfig('main_page') != '' )
- {
- $this->main_page();
- }
- if(strstr($_GET['title'], ' '))
+ if( isset($_GET['title']) )
{
- $loc = urldecode(rawurldecode($_SERVER['REQUEST_URI']));
- $loc = str_replace(' ', '_', $loc);
- $loc = str_replace('+', '_', $loc);
- $loc = str_replace('%20', '_', $loc);
- redirect($loc, 'Redirecting...', 'Space detected in the URL, please wait whilst you are redirected', 0);
- exit;
+ if ( $_GET['title'] == '' && getConfig('main_page') != '' )
+ {
+ $this->main_page();
+ }
+ if(strstr($_GET['title'], ' '))
+ {
+ $loc = urldecode(rawurldecode($_SERVER['REQUEST_URI']));
+ $loc = str_replace(' ', '_', $loc);
+ $loc = str_replace('+', '_', $loc);
+ $loc = str_replace('%20', '_', $loc);
+ redirect($loc, 'Redirecting...', 'Space detected in the URL, please wait whilst you are redirected', 0);
+ exit;
+ }
+ $url_namespace_special = substr($_GET['title'], 0, strlen($this->nslist['Special']) );
+ $url_namespace_template = substr($_GET['title'], 0, strlen($this->nslist['Template']) );
+ if($url_namespace_special == $this->nslist['Special'] || $url_namespace_template == $this->nslist['Template'] )
+ {
+ $ex = explode('/', $_GET['title']);
+ $this->page = $ex[0];
+ }
+ else
+ {
+ $this->page = $_GET['title'];
+ }
+ $this->fullpage = $_GET['title'];
}
- $url_namespace_special = substr($_GET['title'], 0, strlen($this->nslist['Special']) );
- $url_namespace_template = substr($_GET['title'], 0, strlen($this->nslist['Template']) );
- if($url_namespace_special == $this->nslist['Special'] || $url_namespace_template == $this->nslist['Template'] )
+ elseif( isset($_SERVER['PATH_INFO']) )
{
- $ex = explode('/', $_GET['title']);
- $this->page = $ex[0];
+ $pi = explode('/', $_SERVER['PATH_INFO']);
+
+ if( !isset($pi[1]) || (isset($pi[1]) && $pi[1] == '' && getConfig('main_page') != '') )
+ {
+ $this->main_page();
+ }
+ if( strstr($pi[1], ' ') )
+ {
+ $loc = str_replace(' ', '_', urldecode(rawurldecode($_SERVER['REQUEST_URI'])));
+ $loc = str_replace('+', '_', $loc);
+ $loc = str_replace('%20', '_', $loc);
+ redirect($loc, 'Redirecting...', 'Please wait whilst you are redirected', 3);
+ exit;
+ }
+ unset($pi[0]);
+ if( substr($pi[1], 0, strlen($this->nslist['Special'])) == $this->nslist['Special'] || substr($pi[1], 0, strlen($this->nslist['Template'])) == $this->nslist['Template'] )
+ {
+ $pi2 = $pi[1];
+ }
+ else
+ {
+ $pi2 = implode('/', $pi);
+ }
+ $this->page = $pi2;
+ $this->fullpage = implode('/', $pi);
}
else
{
- $this->page = $_GET['title'];
- }
- $this->fullpage = $_GET['title'];
- }
- elseif( isset($_SERVER['PATH_INFO']) )
- {
- $pi = explode('/', $_SERVER['PATH_INFO']);
-
- if( !isset($pi[1]) || (isset($pi[1]) && $pi[1] == '' && getConfig('main_page') != '') )
- {
- $this->main_page();
+ $k = array_keys($_GET);
+ foreach($k as $c)
+ {
+ if(substr($c, 0, 1) == '/')
+ {
+ $this->page = substr($c, 1, strlen($c));
+
+ // Bugfix for apache somehow passing dots as underscores
+ global $mime_types;
+
+ $exts = array_keys($mime_types);
+ $exts = '(' . implode('|', $exts) . ')';
+
+ if ( preg_match( '#_'.$exts.'#i', $this->page ) )
+ {
+ $this->page = preg_replace( '#_'.$exts.'#i', '.\\1', $this->page );
+ }
+
+ $this->fullpage = $this->page;
+
+ if(substr($this->page, 0, strlen($this->nslist['Special']))==$this->nslist['Special'] || substr($this->page, 0, strlen($this->nslist['Template']))==$this->nslist['Template'])
+ {
+ $ex = explode('/', $this->page);
+ $this->page = $ex[0];
+ }
+ if(strstr($this->page, ' '))
+ {
+ $loc = str_replace(' ', '_', urldecode(rawurldecode($_SERVER['REQUEST_URI'])));
+ $loc = str_replace('+', '_', $loc);
+ $loc = str_replace('%20', '_', $loc);
+ redirect($loc, 'Redirecting...', 'Space in the URL detected, please wait whilst you are redirected', 0);
+ exit;
+ }
+ break;
+ }
+ }
+ if(!$this->page && !($this->page == '' && getConfig('main_page') == ''))
+ {
+ $this->main_page();
+ }
}
- if( strstr($pi[1], ' ') )
- {
- $loc = str_replace(' ', '_', urldecode(rawurldecode($_SERVER['REQUEST_URI'])));
- $loc = str_replace('+', '_', $loc);
- $loc = str_replace('%20', '_', $loc);
- redirect($loc, 'Redirecting...', 'Please wait whilst you are redirected', 3);
- exit;
- }
- unset($pi[0]);
- if( substr($pi[1], 0, strlen($this->nslist['Special'])) == $this->nslist['Special'] || substr($pi[1], 0, strlen($this->nslist['Template'])) == $this->nslist['Template'] )
- {
- $pi2 = $pi[1];
- }
- else
- {
- $pi2 = implode('/', $pi);
- }
- $this->page = $pi2;
- $this->fullpage = implode('/', $pi);
}
else
{
- $k = array_keys($_GET);
- foreach($k as $c)
+ // Starting up Enano with the API from a page that wants to do its own thing. Generate
+ // metadata for an anonymous page and avoid redirection at all costs.
+ if ( isset($GLOBALS['title']) )
+ {
+ $title =& $GLOBALS['title'];
+ }
+ else if ( isset($_SERVER['REQUEST_URI']) )
+ {
+ $title = basename($_SERVER['REQUEST_URI']);
+ }
+ else
{
- if(substr($c, 0, 1) == '/')
- {
- $this->page = substr($c, 1, strlen($c));
-
- // Bugfix for apache somehow passing dots as underscores
- global $mime_types;
-
- $exts = array_keys($mime_types);
- $exts = '(' . implode('|', $exts) . ')';
-
- if ( preg_match( '#_'.$exts.'#i', $this->page ) )
- {
- $this->page = preg_replace( '#_'.$exts.'#i', '.\\1', $this->page );
- }
-
- $this->fullpage = $this->page;
-
- if(substr($this->page, 0, strlen($this->nslist['Special']))==$this->nslist['Special'] || substr($this->page, 0, strlen($this->nslist['Template']))==$this->nslist['Template'])
- {
- $ex = explode('/', $this->page);
- $this->page = $ex[0];
- }
- if(strstr($this->page, ' '))
- {
- $loc = str_replace(' ', '_', urldecode(rawurldecode($_SERVER['REQUEST_URI'])));
- $loc = str_replace('+', '_', $loc);
- $loc = str_replace('%20', '_', $loc);
- redirect($loc, 'Redirecting...', 'Space in the URL detected, please wait whilst you are redirected', 0);
- exit;
- }
- break;
- }
+ $title = 'Untitled page';
}
- if(!$this->page && !($this->page == '' && getConfig('main_page') == ''))
- {
- $this->main_page();
- }
+ $this->page = $this->nslist['Special'] . 'AnonymousPage';
+ $this->fullpage = $this->nslist['Special'] . 'AnonymousPage';
+ $this->cpage = array(
+ 'name' => $title,
+ 'urlname' => 'AnonymousPage',
+ 'namespace' => 'Special',
+ 'special' => 0,
+ 'visible' => 1,
+ 'comments_on' => 0,
+ 'protected' => 1,
+ 'delvotes' => 0,
+ 'delvote_ips' => ''
+ );
+ $this->anonymous_page = true;
}
$this->page = sanitize_page_id($this->page);
$this->fullpage = sanitize_page_id($this->fullpage);
- dc_here('paths: setting $paths->cpage');
-
if(isset($this->pages[$this->page]))
{
- dc_here('paths: page existence verified, our page ID is: '.$this->page);
$this->page_exists = true;
$this->cpage = $this->pages[$this->page];
$this->namespace = $this->cpage['namespace'];
@@ -304,7 +330,6 @@
}
else
{
- dc_here('paths: page doesn\'t exist, creating new page in memory
our page ID is: '.$this->page);
$this->page_exists = false;
$page_name = dirtify_page_id($this->page);
$page_name = str_replace('_', ' ', $page_name);
@@ -315,18 +340,21 @@
redirect($pid_cleaned, 'Sanitizer message', 'page id sanitized', 0);
}
- $this->cpage = Array(
- 'name'=>$page_name,
- 'urlname'=>$this->page,
- 'namespace'=>'Article',
- 'special'=>0,
- 'visible'=>0,
- 'comments_on'=>1,
- 'protected'=>0,
- 'delvotes'=>0,
- 'delvote_ips'=>'',
- 'wiki_mode'=>2,
- );
+ if ( !is_array($this->cpage) )
+ {
+ $this->cpage = Array(
+ 'name'=>$page_name,
+ 'urlname'=>$this->page,
+ 'namespace'=>'Article',
+ 'special'=>0,
+ 'visible'=>0,
+ 'comments_on'=>1,
+ 'protected'=>0,
+ 'delvotes'=>0,
+ 'delvote_ips'=>'',
+ 'wiki_mode'=>2,
+ );
+ }
// Look for a namespace prefix in the urlname, and assign a different namespace, if necessary
$k = array_keys($this->nslist);
for($i=0;$inslist);$i++)
@@ -348,7 +376,7 @@
{
$this->cpage['protected'] = 1;
}
- if($this->namespace == 'Special')
+ if($this->namespace == 'Special' && !$this->anonymous_page)
{
// Can't load nonexistent pages
if( is_string(getConfig('main_page')) )
@@ -384,7 +412,6 @@
function add_page($flags)
{
- //dc_dump($flags, 'paths: page added by plugin:');
$flags['urlname_nons'] = $flags['urlname'];
$flags['urlname'] = $this->nslist[$flags['namespace']] . $flags['urlname']; // Applies the User:/File:/etc prefixes to the URL names
$pages_len = sizeof($this->pages)/2;
@@ -409,7 +436,6 @@
function sysmsg($n)
{
global $db, $session, $paths, $template, $plugins; // Common objects
- dc_here('paths: system message requested: '.$n);
$q = $db->sql_query('SELECT page_text, char_tag FROM '.table_prefix.'page_text WHERE page_id=\''.$db->escape($n).'\' AND namespace=\'System\'');
if( !$q )
{
diff -r a1ccf990db6b -r a007145a0ff6 includes/plugins.php
--- a/includes/plugins.php Sat Dec 01 02:39:49 2007 -0500
+++ b/includes/plugins.php Mon Dec 03 17:36:25 2007 -0500
@@ -19,8 +19,6 @@
var $system_plugins = Array('SpecialUserFuncs.php','SpecialUserPrefs.php','SpecialPageFuncs.php','SpecialAdmin.php','SpecialCSS.php','SpecialUpdownload.php','SpecialSearch.php','PrivateMessages.php','SpecialGroups.php');
function loadAll()
{
- dc_here('plugins: building file list');
-
$dir = ENANO_ROOT.'/plugins/';
$this->load_list = Array();
@@ -67,7 +65,6 @@
//die(''.htmlspecialchars(print_r($plugins, true)).'
');
}
function setHook($name, $opts = Array()) {
- dc_dump($name, 'plugins: hook added: ');
/*
$r = Array();
if(isset($this->hook_list[$name])) {
@@ -89,7 +86,6 @@
}
}
function attachHook($name, $code) {
- dc_dump($code, 'plugins: hook attached: '.$name.'
code:');
if(!isset($this->hook_list[$name]))
{
$this->hook_list[$name] = Array();
diff -r a1ccf990db6b -r a007145a0ff6 includes/render.php
--- a/includes/render.php Sat Dec 01 02:39:49 2007 -0500
+++ b/includes/render.php Mon Dec 03 17:36:25 2007 -0500
@@ -41,7 +41,6 @@
function getPage($page_id, $namespace, $wiki = 1, $smilies = true, $filter_links = true, $redir = true, $render = true)
{
global $db, $session, $paths, $template, $plugins; // Common objects
- dc_here('render: page requested
ID/namespace: '."$page_id, $namespace
Wiki mode: $wiki
Smilies: ".(string)$smilies."
Allow redirects: ".(string)$redir);
$perms =& $session;
@@ -81,7 +80,6 @@
if ( preg_match("#^\#redirect \[\[([^\]\r\n\a\t]+?)\]\]#", $message, $m) && $redir && ( !isset($_GET['redirect']) || ( isset($_GET['redirect']) && $_GET['redirect'] != 'no' ) ) )
{
- dc_here('render: looks like a redirect page to me...');
$old = $paths->cpage;
$a = RenderMan::strToPageID($m[1]);
$a[0] = str_replace(' ', '_', $a[0]);
@@ -91,8 +89,6 @@
$paths->cpage = $paths->pages[$pageid];
//die(''.print_r($paths->cpage,true).'
');
- dc_here('render: wreckin\' $template, and reloading the theme vars to match the new page
This might get messy!');
-
unset($template);
unset($GLOBALS['template']);
@@ -108,21 +104,17 @@
}
else if(preg_match('#^\#redirect \[\[(.+?)\]\]#', $message, $m) && isset($_GET['redirect']) && $_GET['redirect'] == 'no')
{
- dc_here('render: looks like a redirect page to me...');
- dc_here('render: skipping redirect as requested on URI');
preg_match('#^\#redirect \[\[(.+)\]\]#', $message, $m);
$m[1] = str_replace(' ', '_', $m[1]);
$message = preg_replace('#\#redirect \[\[(.+)\]\]#', ' | This page is a redirector. This means that this page will not show its own content by default. Instead it will display the contents of the page it redirects to.
To create a redirect page, make the first characters in the page content #redirect [[Page_ID]]. For more information, see the Enano Wiki formatting guide.
This page redirects to '.$paths->pages[$m[1]]['name'].'. |
', $message);
}
$session->disallow_password_grab();
- dc_here('render: alright, got the text, formatting...');
return ($render) ? RenderMan::render($message, $wiki, $smilies, $filter_links) : $message;
}
function getTemplate($id, $parms)
{
global $db, $session, $paths, $template, $plugins; // Common objects
- dc_here('render: template requested: '.$id);
if(!isset($paths->pages[$paths->nslist['Template'].$id]))
{
return '[['.$paths->nslist['Template'].$id.']]';
@@ -161,7 +153,6 @@
function fetch_template_text($id)
{
global $db, $session, $paths, $template, $plugins; // Common objects
- dc_here('render: template raw data requested: '.$id);
if(!isset($paths->pages[$paths->nslist['Template'].$id]))
{
return '[['.$paths->nslist['Template'].$id.']]';
diff -r a1ccf990db6b -r a007145a0ff6 includes/sessions.php
--- a/includes/sessions.php Sat Dec 01 02:39:49 2007 -0500
+++ b/includes/sessions.php Mon Dec 03 17:36:25 2007 -0500
@@ -1639,7 +1639,6 @@
$message .= "$prot://".$_SERVER['HTTP_HOST'].$p.$aklink;
$message .= "\n\nSincerely yours, \n$admin_user and the ".$_SERVER['HTTP_HOST']." administration team";
error_reporting(E_ALL);
- dc_dump($r, 'session: about to send activation e-mail to '.$r['email']);
if(getConfig('smtp_enabled') == '1')
{
$result = smtp_send_email($r['email'], getConfig('site_name').' website account activation', preg_replace("#(?tpl_bool = Array();
$this->tpl_strings = Array();
$this->sidebar_extra = '';
@@ -136,8 +135,6 @@
global $db, $session, $paths, $template, $plugins; // Common objects
global $email;
- dc_here("template: initializing all variables");
-
if(!$this->theme || !$this->style)
{
$this->load_theme();
@@ -145,7 +142,6 @@
if(defined('ENANO_TEMPLATE_LOADED'))
{
- dc_here('template: access denied to call template::init_vars(), bailing out');
die_semicritical('Illegal call', '$template->load_theme was called multiple times, this is not supposed to happen. Exiting with fatal error.
');
}
@@ -153,8 +149,6 @@
$tplvars = $this->extract_vars('elements.tpl');
- dc_here('template: setting all template vars');
-
if(isset($_SERVER['HTTP_USER_AGENT']) && strstr($_SERVER['HTTP_USER_AGENT'], 'MSIE'))
{
$this->add_header('
@@ -243,14 +237,17 @@
$btn_selected = ( isset($tplvars['toolbar_button_selected'])) ? $tplvars['toolbar_button_selected'] : $tplvars['toolbar_button'];
$parser = $this->makeParserText($btn_selected);
- $parser->assign_vars(array(
- 'FLAGS' => 'onclick="if ( !KILL_SWITCH ) { void(ajaxReset()); return false; }" title="View the page contents, all of the page contents, and nothing but the page contents (alt-a)" accesskey="a"',
- 'PARENTFLAGS' => 'id="mdgToolbar_article"',
- 'HREF' => makeUrl($paths->page, null, true),
- 'TEXT' => $this->namespace_string
- ));
-
- $tb .= $parser->run();
+ if ( !$paths->anonymous_page )
+ {
+ $parser->assign_vars(array(
+ 'FLAGS' => 'onclick="if ( !KILL_SWITCH ) { void(ajaxReset()); return false; }" title="View the page contents, all of the page contents, and nothing but the page contents (alt-a)" accesskey="a"',
+ 'PARENTFLAGS' => 'id="mdgToolbar_article"',
+ 'HREF' => makeUrl($paths->page, null, true),
+ 'TEXT' => $this->namespace_string
+ ));
+
+ $tb .= $parser->run();
+ }
$button = $this->makeParserText($tplvars['toolbar_button']);
@@ -556,7 +553,7 @@
}
// Manage ACLs button
- if($session->get_permissions('edit_acl') || $session->user_level >= USER_LEVEL_ADMIN)
+ if ( !$paths->anonymous_page && ( $session->get_permissions('edit_acl') || $session->user_level >= USER_LEVEL_ADMIN ) )
{
$menubtn->assign_vars(array(
'FLAGS' => 'onclick="if ( !KILL_SWITCH ) { return ajaxOpenACLManager(); }" title="Manage who can do what with this page (alt-m)" accesskey="m"',
@@ -781,7 +778,6 @@
}
$headers_sent = true;
- dc_here('template: generating and sending the page header');
if(!defined('ENANO_HEADERS_SENT'))
define('ENANO_HEADERS_SENT', '');
if ( !$this->no_headers )
@@ -813,7 +809,6 @@
function footer($simple = false)
{
global $db, $session, $paths, $template, $plugins; // Common objects
- dc_here('template: generating and sending the page footer');
if(!$this->no_headers) {
if(!defined('ENANO_HEADERS_SENT'))
@@ -844,7 +839,6 @@
function getHeader()
{
$headers_sent = true;
- dc_here('template: generating and sending the page header');
if(!defined('ENANO_HEADERS_SENT'))
define('ENANO_HEADERS_SENT', '');
if(!$this->no_headers) return $this->process_template('header.tpl');
@@ -852,7 +846,6 @@
function getFooter()
{
global $db, $session, $paths, $template, $plugins; // Common objects
- dc_here('template: generating and sending the page footer');
if(!$this->no_headers) {
global $_starttime;
$t = '';
diff -r a1ccf990db6b -r a007145a0ff6 index.php
--- a/index.php Sat Dec 01 02:39:49 2007 -0500
+++ b/index.php Mon Dec 03 17:36:25 2007 -0500
@@ -16,6 +16,8 @@
*
*/
+ define('ENANO_INTERFACE_INDEX', '');
+
// Set up gzip encoding before any output is sent
$aggressive_optimize_html = true;
diff -r a1ccf990db6b -r a007145a0ff6 themes/oxygen/css/bleu.css
--- a/themes/oxygen/css/bleu.css Sat Dec 01 02:39:49 2007 -0500
+++ b/themes/oxygen/css/bleu.css Mon Dec 03 17:36:25 2007 -0500
@@ -26,7 +26,7 @@
div.rectbot { width: 140px; height: 12px; margin: 0; padding: 0; }
td.rectbottop { width: 100%; height: 12px; background-image: url(../images/bleu/border-btm.gif); background-repeat: repeat-x; margin: 0; padding: 0; }
div.slideblock, .dbx-content { overflow: hidden; background-color: #DDD; }
-div.slideblock2 { overflow: hidden; background-color: #DDD; margin: 0px 1px 0px 1px; }
+div.slideblock2 { overflow: hidden; background-color: #DDD; margin: 0px 1px 0px 1px; border-bottom: 1px solid #FFF; }
.dbx-handle { cursor: move !important; }
/* The credits thingy at the bottom */
diff -r a1ccf990db6b -r a007145a0ff6 themes/oxygen/css/mint.css
--- a/themes/oxygen/css/mint.css Sat Dec 01 02:39:49 2007 -0500
+++ b/themes/oxygen/css/mint.css Mon Dec 03 17:36:25 2007 -0500
@@ -26,7 +26,7 @@
div.rectbot { width: 140px; height: 12px; margin: 0; padding: 0; }
td.rectbottop { width: 100%; height: 12px; background-image: url(../images/mint/border-btm.gif); background-repeat: repeat-x; margin: 0; padding: 0; }
div.slideblock, .dbx-content { overflow: hidden; background-color: #DDD; }
-div.slideblock2 { overflow: hidden; background-color: #DDD; margin: 0px 1px 0px 1px; }
+div.slideblock2 { overflow: hidden; background-color: #DDD; margin: 0px 1px 0px 1px; border-bottom: 1px solid #FFF; }
.dbx-handle { cursor: move !important; }
/* The credits thingy at the bottom */