Added but didn't set up custom_user_title ACL; fixed rebuild_page_index() to use word_lcase
authorDan
Sat, 26 Apr 2008 17:25:28 -0400
changeset 540 1e4b759da336
parent 539 1beddd693f2d
child 541 acb7e23b6ffa
Added but didn't set up custom_user_title ACL; fixed rebuild_page_index() to use word_lcase
includes/paths.php
language/english/core.json
--- a/includes/paths.php	Mon Apr 21 19:37:31 2008 -0400
+++ b/includes/paths.php	Sat Apr 26 17:25:28 2008 -0400
@@ -75,6 +75,7 @@
     $session->register_acl_type('create_page',            AUTH_WIKIMODE, 'perm_create_page',            Array(),                                                  'Article|User|Project|Template|File|Help|System|Category|Special');
     $session->register_acl_type('html_in_pages',          AUTH_DISALLOW, 'perm_html_in_pages',          Array('edit_page'),                                       'Article|User|Project|Template|File|Help|System|Category|Admin');
     $session->register_acl_type('php_in_pages',           AUTH_DISALLOW, 'perm_php_in_pages',           Array('edit_page', 'html_in_pages'),                      'Article|User|Project|Template|File|Help|System|Category|Admin');
+    $session->register_acl_type('custom_user_title',      AUTH_DISALLOW, 'perm_custom_user_title',      Array(''),                                                'User|Special');
     $session->register_acl_type('edit_acl',               AUTH_DISALLOW, 'perm_edit_acl',               Array('read', 'post_comments', 'edit_comments', 'edit_page', 'view_source', 'mod_comments', 'history_view', 'history_rollback', 'history_rollback_extra', 'protect', 'rename', 'clear_logs', 'vote_delete', 'vote_reset', 'delete_page', 'set_wiki_mode', 'password_set', 'password_reset', 'mod_misc', 'edit_cat', 'even_when_protected', 'upload_files', 'upload_new_version', 'create_page', 'php_in_pages'));
     
     // DO NOT add new admin pages here! Use a plugin to call $paths->addAdminNode();
@@ -849,10 +850,10 @@
     $db->sql_query('DELETE FROM '.table_prefix.'search_index WHERE '.$keys.';');
     
     $secs = Array();
-    $q = 'INSERT INTO '.table_prefix.'search_index(word,page_names) VALUES';
+    $q = 'INSERT INTO '.table_prefix.'search_index(word,word_lcase,page_names) VALUES';
     foreach($new_index as $word => $pages)
     {
-      $secs[] = '(\''.$db->escape($word).'\', \''.$db->escape($pages).'\')';
+      $secs[] = '(\''.$db->escape($word).'\', \'' . $db->escape(strtolower($word)) . '\', \''.$db->escape($pages).'\')';
     }
     $q .= implode(',', $secs);
     unset($secs);
--- a/language/english/core.json	Mon Apr 21 19:37:31 2008 -0400
+++ b/language/english/core.json	Sat Apr 26 17:25:28 2008 -0400
@@ -523,6 +523,7 @@
       create_page: 'Create pages',
       html_in_pages: 'Embed unrestricted HTML in pages',
       php_in_pages: 'Embed PHP code in pages',
+      custom_user_title: 'Use a custom user title',
       edit_acl: 'Edit access control lists',
     },
     plugin: {