# HG changeset patch # User Dan # Date 1194090054 14400 # Node ID b0a4d179be8580c790115ea542803b6fd7912b35 # Parent 90b7a52bea45310afe544efe84d1f01175425c9f# Parent 0eca1498a77b057dfe685447666668e3942c14ba Merging in fixes and updates from 90b7a52bea45 diff -r 0eca1498a77b -r b0a4d179be85 .hgtags diff -r 0eca1498a77b -r b0a4d179be85 ajax.php diff -r 0eca1498a77b -r b0a4d179be85 includes/common.php --- a/includes/common.php Sat Nov 03 07:30:11 2007 -0400 +++ b/includes/common.php Sat Nov 03 07:40:54 2007 -0400 @@ -68,6 +68,9 @@ if ( file_exists( ENANO_ROOT . '/_nightly.php') ) require(ENANO_ROOT.'/_nightly.php'); +// List of scheduled tasks +$cron_tasks = array(); + // Start including files. LOTS of files. Yeah! require_once(ENANO_ROOT.'/includes/constants.php'); dc_here('Enano CMS '.$version.' (dev) - debug window
Powered by debugConsole'); diff -r 0eca1498a77b -r b0a4d179be85 includes/constants.php --- a/includes/constants.php Sat Nov 03 07:30:11 2007 -0400 +++ b/includes/constants.php Sat Nov 03 07:40:54 2007 -0400 @@ -73,7 +73,7 @@ define('MAX_PMS_PER_BATCH', 7); // The maximum number of users that users can send PMs to in one go; restriction does not apply to users with mod_misc rights define('SEARCH_RESULTS_PER_PAGE', 10); define('MYSQL_MAX_PACKET_SIZE', 1048576); // 1MB; this is the default in MySQL 4.x I think -define('SEARCH_MODE', 'BUILTIN'); // Can be FULLTEXT or BUILTIN +define('SEARCH_MODE', 'FULLTEXT'); // Can be FULLTEXT or BUILTIN // Sidebar diff -r 0eca1498a77b -r b0a4d179be85 includes/functions.php --- a/includes/functions.php Sat Nov 03 07:30:11 2007 -0400 +++ b/includes/functions.php Sat Nov 03 07:40:54 2007 -0400 @@ -2804,7 +2804,7 @@ $strip_tags = implode('|', $strip_tags); // Strip out the tags and replace with placeholders - preg_match_all("#<($strip_tags)(.*?)>(.*?)#is", $html, $matches); + preg_match_all("#<($strip_tags)([ ]+.*?)?>(.*?)#is", $html, $matches); $seed = md5(microtime() . mt_rand()); // Random value used for placeholders for ($i = 0;$i < sizeof($matches[1]); $i++) { @@ -2812,7 +2812,7 @@ } // Optimize (but don't obfuscate) Javascript - preg_match_all('/(.+?)<\/script>/is', $html, $jscript); + preg_match_all('/(.*?)(\]\]>)?<\/script>/is', $html, $jscript); // list of Javascript reserved words - from about.com $reserved_words = array('abstract', 'as', 'boolean', 'break', 'byte', 'case', 'catch', 'char', 'class', 'continue', 'const', 'debugger', 'default', 'delete', 'do', diff -r 0eca1498a77b -r b0a4d179be85 includes/render.php diff -r 0eca1498a77b -r b0a4d179be85 includes/sessions.php diff -r 0eca1498a77b -r b0a4d179be85 includes/template.php diff -r 0eca1498a77b -r b0a4d179be85 index.php diff -r 0eca1498a77b -r b0a4d179be85 plugins/SpecialAdmin.php diff -r 0eca1498a77b -r b0a4d179be85 plugins/admin/PageGroups.php --- a/plugins/admin/PageGroups.php Sat Nov 03 07:30:11 2007 -0400 +++ b/plugins/admin/PageGroups.php Sat Nov 03 07:40:54 2007 -0400 @@ -2,7 +2,7 @@ /* * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between - * Version 1.1.1 + * Version 1.0.2 (Coblynau) * Copyright (C) 2006-2007 Dan Fuhry * * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License @@ -602,6 +602,23 @@ echo '
The affecting tag was updated.
'; } } + else if ( $_POST['pg_type'] == PAGE_GRP_REGEX ) + { + $target = $_POST['pg_target']; + if ( empty($target) ) + { + echo '
Please enter an expression to match against..
'; + } + else + { + $target = $db->escape($target); + $q = $db->sql_query('UPDATE '.table_prefix.'page_groups SET pg_target=\'' . $target . '\' WHERE pg_id=' . $edit_id . ';'); + if ( !$q ) + $db->_die(); + else + echo '
The expression to match against was updated.
'; + } + } else if ( $_POST['pg_type'] == PAGE_GRP_CATLINK ) { $target = $_POST['pg_target']; @@ -860,6 +877,22 @@ '; break; + case PAGE_GRP_REGEX: + echo ' + + Regular expression to use:
+ Be sure to include the starting and ending delimiters and any flags you might need.
+ These pages might help: Pattern modifiers • + Pattern syntax
+ Examples: /^(Special|Admin):/i/^Image:([0-9]+)$/
+ Developers, remember that this will be matched against the full page identifier string. This means that /^About_Enano$/ + will NOT match the page Special:About_Enano.
+ + + + + '; + break; case PAGE_GRP_CATLINK: // Build category list diff -r 0eca1498a77b -r b0a4d179be85 schema.sql diff -r 0eca1498a77b -r b0a4d179be85 upgrade.php diff -r 0eca1498a77b -r b0a4d179be85 upgrade.sql