# HG changeset patch # User Dan # Date 1196279262 18000 # Node ID ce2873735506709cab42ef903b7a0f0e181634ac # Parent 39c132e69781eb0c2dfc359879c4769e98017e54# Parent ee1fc84f12a8e0a76f56f653a76fdb737c0c832a Oops, never merged in updates from ee1fc84f12a8 (240) diff -r 39c132e69781 -r ce2873735506 .hgtags --- a/.hgtags Wed Nov 28 14:46:03 2007 -0500 +++ b/.hgtags Wed Nov 28 14:47:42 2007 -0500 @@ -7,3 +7,4 @@ 42c6c83b8a004163c9cc2d85f3c8eada3b73adf6 rebrand d53cc29308f4f4b97fc6d054e9e0855f37137409 rebrand 90632c09ed7ec816da708df1341d9f4019de9adf feature-freeze +f948557af0681389165a23419968965fcebcbdd0 devel-freeze diff -r 39c132e69781 -r ce2873735506 includes/clientside/static/misc.js --- a/includes/clientside/static/misc.js Wed Nov 28 14:46:03 2007 -0500 +++ b/includes/clientside/static/misc.js Wed Nov 28 14:47:42 2007 -0500 @@ -634,6 +634,6 @@ function validateEmail(email) { - return ( email.match(/^(?:[\w\d]+\.?)+@((?:(?:[\w\d]\-?)+\.)+\w{2,4}|localhost)$/) ) ? true : false; + return ( email.match(/^(?:[\w\d_-]+\.?)+@((?:(?:[\w\d_-]\-?)+\.)+\w{2,4}|localhost)$/) ) ? true : false; } diff -r 39c132e69781 -r ce2873735506 includes/constants.php --- a/includes/constants.php Wed Nov 28 14:46:03 2007 -0500 +++ b/includes/constants.php Wed Nov 28 14:47:42 2007 -0500 @@ -293,6 +293,22 @@ 'xwd' => 'image/x-xwindowdump', 'xyz' => 'chemical/x-xyz', 'zip' => 'application/zip', + 'odt' => 'application/vnd.oasis.opendocument.text', + 'ott' => 'application/vnd.oasis.opendocument.text-template', + 'odg' => 'application/vnd.oasis.opendocument.graphics', + 'otg' => 'application/vnd.oasis.opendocument.graphics-template', + 'odp' => 'application/vnd.oasis.opendocument.presentation', + 'otp' => 'application/vnd.oasis.opendocument.presentation-template', + 'ods' => 'application/vnd.oasis.opendocument.spreadsheet', + 'ots' => 'application/vnd.oasis.opendocument.spreadsheet-template', + 'odc' => 'application/vnd.oasis.opendocument.chart', + 'otc' => 'application/vnd.oasis.opendocument.chart-template', + 'odi' => 'application/vnd.oasis.opendocument.image', + 'oti' => 'application/vnd.oasis.opendocument.image-template', + 'odf' => 'application/vnd.oasis.opendocument.formula', + 'otf' => 'application/vnd.oasis.opendocument.formula-template', + 'odm' => 'application/vnd.oasis.opendocument.text-master', + 'oth' => 'application/vnd.oasis.opendocument.text-web' ); $mimetype_extlist = Array( @@ -415,6 +431,22 @@ 'x-conference/x-cooltalk'=>'ice', // Added for Enano 'image/xcf' => 'xcf xcfbz2 xcf.bz2', + 'application/vnd.oasis.opendocument.text' => 'odt', + 'application/vnd.oasis.opendocument.text-template' => 'ott', + 'application/vnd.oasis.opendocument.graphics' => 'odg', + 'application/vnd.oasis.opendocument.graphics-template' => 'otg', + 'application/vnd.oasis.opendocument.presentation' => 'odp', + 'application/vnd.oasis.opendocument.presentation-template' => 'otp', + 'application/vnd.oasis.opendocument.spreadsheet' => 'ods', + 'application/vnd.oasis.opendocument.spreadsheet-template' => 'ots', + 'application/vnd.oasis.opendocument.chart' => 'odc', + 'application/vnd.oasis.opendocument.chart-template' => 'otc', + 'application/vnd.oasis.opendocument.image' => 'odi', + 'application/vnd.oasis.opendocument.image-template' => 'oti', + 'application/vnd.oasis.opendocument.formula' => 'odf', + 'application/vnd.oasis.opendocument.formula-template' => 'otf', + 'application/vnd.oasis.opendocument.text-master' => 'odm', + 'application/vnd.oasis.opendocument.text-web' => 'oth' ); $k = array_keys($mime_types); diff -r 39c132e69781 -r ce2873735506 includes/dbal.php --- a/includes/dbal.php Wed Nov 28 14:46:03 2007 -0500 +++ b/includes/dbal.php Wed Nov 28 14:47:42 2007 -0500 @@ -773,6 +773,15 @@ '; } } + if ( function_exists('array_sum') ) + { + $query_time_total = array_sum($this->query_times); + echo ' + + Total time taken for SQL queries: ' . round( $query_time_total, 6 ) . ' seconds + + '; + } echo ' '; $template->footer(); diff -r 39c132e69781 -r ce2873735506 includes/functions.php --- a/includes/functions.php Wed Nov 28 14:46:03 2007 -0500 +++ b/includes/functions.php Wed Nov 28 14:47:42 2007 -0500 @@ -2709,7 +2709,7 @@ /** * Aggressively and hopefully non-destructively optimizes a blob of HTML. * @param string HTML to process - * @return string much snaller HTML + * @return string much smaller HTML */ function aggressive_optimize_html($html) diff -r 39c132e69781 -r ce2873735506 install.php --- a/install.php Wed Nov 28 14:46:03 2007 -0500 +++ b/install.php Wed Nov 28 14:47:42 2007 -0500 @@ -979,6 +979,7 @@ =4.3.0', 'It seems that the version of PHP that your server is running is too old to support Enano properly. If this is your server, please upgrade to the most recent version of PHP, remembering to use the --with-mysql configure option if you compile it yourself. If this is not your server, please contact your webhost and ask them if it would be possible to upgrade PHP. If this is not possible, you will need to switch to a different webhost in order to use Enano.'); + run_test('return version_compare(\'5.2.0\', PHP_VERSION, \'<\');', 'PHP 5.2.0 or later', 'Your server does not have support for PHP 5.2.0. While you may continue installing Enano, please be warned that as of December 31, 2007, all support for Enano on PHP 4 servers is discontinued. If you have at least PHP 5.0.0, support will still be available, but there are many security problems in PHP versions under 5.2.0 that Enano cannot effectively prevent.', true); run_test('return function_exists(\'mysql_connect\');', 'MySQL extension for PHP', 'It seems that your PHP installation does not have the MySQL extension enabled. If this is your own server, you may need to just enable the "libmysql.so" extension in php.ini. If you do not have the MySQL extension installed, you will need to either use your distribution\'s package manager to install it, or you will have to compile PHP from source. If you compile PHP from source, please remember to use the "--with-mysql" configure option, and you will have to have the MySQL development files installed (they usually are). If this is not your server, please contact your hosting company and ask them to install the PHP MySQL extension.'); run_test('return @ini_get(\'file_uploads\');', 'File upload support', 'It seems that your server does not support uploading files. Enano *requires* this functionality in order to work properly. Please ask your server administrator to set the "file_uploads" option in php.ini to "On".'); run_test('return is_apache();', 'Apache HTTP Server', 'Apparently your server is running a web server other than Apache. Enano will work nontheless, but there are some known bugs with non-Apache servers, and the "fancy" URLs will not work properly. The "Standard URLs" option will be set on the website configuration page, only change it if you are absolutely certain that your server is running Apache.', true); @@ -996,7 +997,7 @@ '; - run_test('return false;', 'Some scalebacks were made due to your server configuration.', 'Enano has detected that some of the features or configuration settings on your server are not optimal for the best behavior and/or performance for Enano. As a result, certain features or enhancements that are part of Enano have been disabled to prevent further errors. You have seen those "fatal error" notices that spew from PHP, haven\'t you?

Fatal error: call to undefined function wannahokaloogie() in file '.__FILE__.' on line '.__LINE__.'', true); + run_test('return false;', 'Some of the features of Enano have been turned off to accommodate your server.', 'Enano has detected that some of the features or configuration settings on your server are not optimal for the best behavior and/or performance for Enano. As a result, Enano has disabled these features as a precaution to prevent errors and potential security issues.', true); echo '
'; } else { echo ''; @@ -1377,7 +1378,7 @@ document.getElementById(\'s_password\').src = \'images/bad.gif\'; ret = false; } - if(frm.admin_email.value.match(/^(?:[\\w\\d]+\\.?)+@(?:(?:[\\w\\d]\\-?)+\\.)+\\w{2,4}$/)) + if(frm.admin_email.value.match(/^(?:[\\w\\d_-]+\\.?)+@(?:(?:[\\w\\d-]\\-?)+\\.)+\\w{2,4}$/)) { document.getElementById(\'s_email\').src = \'images/good.gif\'; } diff -r 39c132e69781 -r ce2873735506 plugins/SpecialAdmin.php --- a/plugins/SpecialAdmin.php Wed Nov 28 14:46:03 2007 -0500 +++ b/plugins/SpecialAdmin.php Wed Nov 28 14:47:42 2007 -0500 @@ -756,6 +756,7 @@ $t = -1; $cl = 'row1'; echo "\n".'
'."\n".'
'."\n".' '."\n "; + ksort($mime_types); foreach($mime_types as $e => $m) { $c++; diff -r 39c132e69781 -r ce2873735506 schema.sql --- a/schema.sql Wed Nov 28 14:46:03 2007 -0500 +++ b/schema.sql Wed Nov 28 14:47:42 2007 -0500 @@ -271,7 +271,7 @@ ('copyright_notice', '{{COPYRIGHT}}'), ('wiki_edit_notice_text', '== Why can I edit this page? ==\n\nEveryone can edit almost any page in this website. This concept is called a wiki. It gives everyone the opportunity to make a change for the best. While some spam and vandalism may occur, it is believed that most contributions will be legitimate and helpful.\n\nFor security purposes, a history of all page edits is kept, and administrators are able to restore vandalized or spammed pages with just a few clicks.'), ('cache_thumbs', '{{ENABLE_CACHE}}'), - ('max_file_size', '256000'),('enano_version', '{{VERSION}}'),( 'allowed_mime_types', 'cbf:len=168;crc=c3dcad3f;data=0[1],1[4],0[3],1[1],0[2],1[1],0[11],1[1],0[7],1[1],0[9],1[1],0[6],1[3],0[10],1[1],0[2],1[2],0[1],1[1],0[1],1[2],0[6],1[3],0[1],1[1],0[2],1[4],0[1],1[2],0[3],1[1],0[4],1[2],0[26],1[5],0[6],1[2],0[2],1[1],0[4],1[1],0[10],1[2],0[1],1[1],0[6]|end' ), + ('max_file_size', '256000'),('enano_version', '{{VERSION}}'),( 'allowed_mime_types', 'cbf:len=185;crc=55fb6f14;data=0[1],1[4],0[3],1[1],0[22],1[1],0[16],1[3],0[16],1[1],0[1],1[2],0[6],1[1],0[1],1[1],0[4],1[2],0[3],1[1],0[48],1[2],0[2],1[1],0[4],1[1],0[37]|end' ), ('contact_email', '{{ADMIN_EMAIL}}'), ('powered_btn', '1'); diff -r 39c132e69781 -r ce2873735506 upgrade.php --- a/upgrade.php Wed Nov 28 14:46:03 2007 -0500 +++ b/upgrade.php Wed Nov 28 14:47:42 2007 -0500 @@ -93,7 +93,7 @@ '1.0b4' => Array('u_1_0_RC1_update_user_ids', 'u_1_0_RC1_add_admins_to_group', 'u_1_0_RC1_alter_files_table', 'u_1_0_RC1_destroy_session_cookie', 'u_1_0_RC1_set_contact_email', 'u_1_0_RC1_update_page_text'), // , // '1.0RC2' => Array('u_1_0_populate_userpage_comments') '1.0RC3' => Array('u_1_0_RC3_make_users_extra'), - '1.0.2b1' => Array('u_1_0_2_nuke_template_cache') + '1.0.2b1' => Array('u_1_0_2_nuke_template_cache', 'u_1_0_2_rebuild_search_index') ); if(!isset($_GET['mode'])) @@ -457,6 +457,13 @@ } } +function u_1_0_2_rebuild_search_index() +{ + global $paths; + @set_time_limit(0); + $paths->rebuild_search_index(); +} + switch($_GET['mode']) { case "login": diff -r 39c132e69781 -r ce2873735506 upgrade.sql --- a/upgrade.sql Wed Nov 28 14:46:03 2007 -0500 +++ b/upgrade.sql Wed Nov 28 14:47:42 2007 -0500 @@ -17,6 +17,7 @@ ALTER TABLE {{TABLE_PREFIX}}pages MODIFY COLUMN urlname varchar(255), MODIFY COLUMN name varchar(255); ALTER TABLE {{TABLE_PREFIX}}page_text MODIFY COLUMN page_id varchar(255), MODIFY COLUMN namespace varchar(63), MODIFY COLUMN page_text longtext; @CREATE FULLTEXT INDEX {{TABLE_PREFIX}}page_search_idx ON {{TABLE_PREFIX}}page_text(page_id, namespace, page_text); +UPDATE {{TABLE_PREFIX}}config SET config_value='cbf:len=185;crc=55fb6f14;data=0[1],1[4],0[3],1[1],0[22],1[1],0[16],1[3],0[16],1[1],0[1],1[2],0[6],1[1],0[1],1[1],0[4],1[2],0[3],1[1],0[48],1[2],0[2],1[1],0[4],1[1],0[37]|end' WHERE config_name = 'allowed_mime_types' AND config_value='cbf:len=168;crc=c3dcad3f;data=0[1],1[4],0[3],1[1],0[2],1[1],0[11],1[1],0[7],1[1],0[9],1[1],0[6],1[3],0[10],1[1],0[2],1[2],0[1],1[1],0[1],1[2],0[6],1[3],0[1],1[1],0[2],1[4],0[1],1[2],0[3],1[1],0[4],1[2],0[26],1[5],0[6],1[2],0[2],1[1],0[4],1[1],0[10],1[2],0[1],1[1],0[6]|end'; ---END 1.0.2b1--- ---BEGIN 1.0.1.1--- ---END 1.0.1.1---