# HG changeset patch # User Dan # Date 1203370107 18000 # Node ID ceff43bbc3d3bc18d7679f88ef6fec2e070bc704 # Parent ec90736b9cb9d9e04ae1c3ec14d8e15e0ce3eb35# Parent 36cec40d981a431dc8e2fa6a7be531f3c29e89fe Detagging last release revision to merge in theme manager from Scribus diff -r ec90736b9cb9 -r ceff43bbc3d3 .hgtags diff -r ec90736b9cb9 -r ceff43bbc3d3 README --- a/README Mon Feb 18 16:27:28 2008 -0500 +++ b/README Mon Feb 18 16:28:27 2008 -0500 @@ -1,5 +1,5 @@ Enano CMS -Version 1.1.1 +Version 1.1.2 ----------------------------- Thanks for downloading Enano! If you're looking for an installation guide, @@ -74,7 +74,7 @@ CHANGES IN THIS RELEASE ----------------------------- -Please see for a list of changes in +Please see for a list of changes in this release. UPGRADING FROM PREVIOUS RELEASES @@ -85,15 +85,19 @@ release (1.0.3 at the time of this writing) BEFORE you run the migration script. DO NOT UPGRADE A PRODUCTION SITE. +As of 1.1.2, basic upgrade functionality is included and is considered highly +experimental. Back up your entire database and Enano root before upgrading. + TRANSLATING ENANO ----------------------------- -This is the first formal release of Enano that is localized. Right now since -this is an alpha, you probably don't want to do any translation because you'll -be doing a TON more strings at every release. HOWEVER, we're looking for people -to sign up and volunteer for translation efforts later on. If you have a native -or very good knowledge of a language, drop us an e-mail and we'll get you onto -the translator list and eventually onto a mailing list specifically for l10n. +This is the only the second formal release of Enano that is localized. Right +now since this is an alpha, you probably don't want to do any translation +because you'll be doing a TON more strings at every release. HOWEVER, we're +looking for people to sign up and volunteer for translation efforts later on. +If you have a native or very good knowledge of a language, drop us an e-mail +and we'll get you onto the translator list and eventually onto a mailing list +specifically for l10n. EXPANDING YOUR SITE'S CAPABILITIES ----------------------------- diff -r ec90736b9cb9 -r ceff43bbc3d3 includes/dbal.php --- a/includes/dbal.php Mon Feb 18 16:27:28 2008 -0500 +++ b/includes/dbal.php Mon Feb 18 16:28:27 2008 -0500 @@ -41,6 +41,8 @@ function enable_errorhandler() { + if ( !defined('ENANO_DEBUG') ) + return true; // echo "DBAL: enabling error handler
"; if ( function_exists('debug_backtrace') ) { @@ -50,6 +52,8 @@ function disable_errorhandler() { + if ( !defined('ENANO_DEBUG') ) + return true; // echo "DBAL: disabling error handler
"; if ( $this->errhandler ) { @@ -210,9 +214,10 @@ return true; } - function sql_query($q) + function sql_query($q, $log_query = true) { - $this->enable_errorhandler(); + if ( $log_query || defined('ENANO_DEBUG') ) + $this->enable_errorhandler(); if ( $this->debug && function_exists('debug_backtrace') ) { @@ -233,34 +238,48 @@ } $this->num_queries++; - $this->query_backtrace[] = $q; - $this->latest_query = $q; + if ( $log_query || defined('ENANO_DEBUG') ) + { + $this->query_backtrace[] = $q; + $this->latest_query = $q; + } // First make sure we have a connection if ( !$this->_conn ) { $this->_die('A database connection has not yet been established.'); } + // Start the timer + if ( $log_query || defined('ENANO_DEBUG') ) + $time_start = microtime_float(); // Does this query look malicious? - if ( !$this->check_query($q) ) + if ( $log_query || defined('ENANO_DEBUG') ) { - $this->report_query($q); - grinding_halt('SQL Injection attempt', '

Enano has caught and prevented an SQL injection attempt. Your IP address has been recorded and the administrator has been notified.

Query was:

'.htmlspecialchars($q).'
'); + if ( !$this->check_query($q) ) + { + $this->report_query($q); + grinding_halt('SQL Injection attempt', '

Enano has caught and prevented an SQL injection attempt. Your IP address has been recorded and the administrator has been notified.

Query was:

'.htmlspecialchars($q).'
'); + } } - $time_start = microtime_float(); $r = mysql_query($q, $this->_conn); - $this->query_times[$q] = microtime_float() - $time_start; + + if ( $log_query ) + $this->query_times[$q] = microtime_float() - $time_start; + $this->latest_result = $r; - $this->disable_errorhandler(); + + if ( $log_query ) + $this->disable_errorhandler(); return $r; } - function sql_unbuffered_query($q) + function sql_unbuffered_query($q, $log_query = true) { $this->enable_errorhandler(); $this->num_queries++; - $this->query_backtrace[] = '(UNBUFFERED) ' . $q; + if ( $log_query || defined('ENANO_DEBUG') ) + $this->query_backtrace[] = '(UNBUFFERED) ' . $q; $this->latest_query = $q; // First make sure we have a connection if ( !$this->_conn ) diff -r ec90736b9cb9 -r ceff43bbc3d3 includes/functions.php --- a/includes/functions.php Mon Feb 18 16:27:28 2008 -0500 +++ b/includes/functions.php Mon Feb 18 16:28:27 2008 -0500 @@ -4024,8 +4024,13 @@ $_profiler[] = array( 'point' => 'Profiling started', 'time' => microtime_float(), - 'backtrace' => false + 'backtrace' => false, + 'mem' => false ); + if ( function_exists('memory_get_usage') ) + { + $_profiler[ count($_profiler) - 1 ]['mem'] = memory_get_usage(); + } } /** @@ -4048,8 +4053,13 @@ $_profiler[] = array( 'point' => $point, 'time' => microtime_float(), - 'backtrace' => $backtrace + 'backtrace' => $backtrace, + 'mem' => false ); + if ( function_exists('memory_get_usage') ) + { + $_profiler[ count($_profiler) - 1 ]['mem'] = memory_get_usage(); + } } /** @@ -4114,6 +4124,14 @@ $html .= '' . "\n"; } + if ( $entry['mem'] ) + { + $html .= '' . "\n"; + $html .= ' Total mem usage:' . "\n"; + $html .= ' ' . htmlspecialchars($entry['mem']) . ' (bytes)' . "\n"; + $html .= '' . "\n"; + } + $html .= "\n"; $time_last = $entry['time']; diff -r ec90736b9cb9 -r ceff43bbc3d3 includes/pageutils.php diff -r ec90736b9cb9 -r ceff43bbc3d3 includes/sessions.php --- a/includes/sessions.php Mon Feb 18 16:27:28 2008 -0500 +++ b/includes/sessions.php Mon Feb 18 16:28:27 2008 -0500 @@ -1624,7 +1624,7 @@ { while ( list($reason_temp, $ban_value, $ban_type, $is_regex) = $db->fetchrow_num() ) { - if ( $ban_type == BAN_IP && $row['is_regex'] != 1 ) + if ( $ban_type == BAN_IP && $is_regex != 1 ) { // check range $regexp = parse_ip_range_regex($ban_value); diff -r ec90736b9cb9 -r ceff43bbc3d3 language/english/admin.json diff -r ec90736b9cb9 -r ceff43bbc3d3 language/english/core.json diff -r ec90736b9cb9 -r ceff43bbc3d3 language/english/user.json diff -r ec90736b9cb9 -r ceff43bbc3d3 plugins/PrivateMessages.php diff -r ec90736b9cb9 -r ceff43bbc3d3 plugins/SpecialAdmin.php diff -r ec90736b9cb9 -r ceff43bbc3d3 plugins/SpecialGroups.php