# HG changeset patch # User Dan # Date 1260650676 18000 # Node ID c0e0a1787a635b2ad00f8ec4e05479c1f57cdfe0 # Parent e154e8176700a574bf51c8e3c5c9e63ff9eef4a2# Parent a1cca4472a5867900de1c66925b1dce7a502da8c Re-merge changes from a2hosting dev diff -r a1cca4472a58 -r c0e0a1787a63 includes/paths.php --- a/includes/paths.php Sat Dec 12 15:43:23 2009 -0500 +++ b/includes/paths.php Sat Dec 12 15:44:36 2009 -0500 @@ -80,9 +80,9 @@ $session->register_acl_type('mod_misc', AUTH_DISALLOW, 'perm_mod_misc', Array(), 'All'); $session->register_acl_type('edit_cat', AUTH_WIKIMODE, 'perm_edit_cat', Array('read'), 'Article|User|Project|Template|File|Help|System|Category'); $session->register_acl_type('even_when_protected', AUTH_DISALLOW, 'perm_even_when_protected', Array('edit_page', 'rename', 'mod_comments', 'edit_cat'), 'Article|User|Project|Template|File|Help|System|Category'); - $session->register_acl_type('upload_files', AUTH_DISALLOW, 'perm_upload_files', Array('create_page'), 'Article|User|Project|Template|File|Help|System|Category|Special'); - $session->register_acl_type('upload_new_version', AUTH_WIKIMODE, 'perm_upload_new_version', Array('upload_files'), 'Article|User|Project|Template|File|Help|System|Category|Special'); - $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('create_page', AUTH_WIKIMODE, 'perm_create_page', Array(), 'All'); + $session->register_acl_type('upload_files', AUTH_DISALLOW, 'perm_upload_files', Array('create_page'), 'All'); + $session->register_acl_type('upload_new_version', AUTH_WIKIMODE, 'perm_upload_new_version', Array('upload_files'), 'All'); $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'); diff -r a1cca4472a58 -r c0e0a1787a63 includes/render.php --- a/includes/render.php Sat Dec 12 15:43:23 2009 -0500 +++ b/includes/render.php Sat Dec 12 15:44:36 2009 -0500 @@ -929,8 +929,8 @@ eval($cmd); } - $can_do_php = ( $session->get_permissions('php_in_pages') && !$strip_all_php ); - $can_do_html = $session->get_permissions('html_in_pages'); + $can_do_php = ( !$strip_all_php && $session->get_permissions('php_in_pages') ); + $can_do_html = $session->check_acl_scope('html_in_pages', $paths->namespace) && $session->get_permissions('html_in_pages'); if ( $can_do_html && !$can_do_php ) { diff -r a1cca4472a58 -r c0e0a1787a63 includes/sessions.php --- a/includes/sessions.php Sat Dec 12 15:43:23 2009 -0500 +++ b/includes/sessions.php Sat Dec 12 15:44:36 2009 -0500 @@ -3372,6 +3372,7 @@ if ( !$this->check_acl_scope($deps[$i], $paths->namespace) ) { // Action $type depends on action $deps[$i] which cannot be satisfied because $deps[$i] is out of scope. + // echo '
' . enano_debug_print_backtrace(true) . ''; trigger_error("acl_check_deps: $type depends on {$deps[$i]} which is not within scope of $paths->namespace; this indicats a bug in ACL rule specification", E_USER_WARNING); return false; } diff -r a1cca4472a58 -r c0e0a1787a63 includes/wikiengine/parse_mediawiki.php --- a/includes/wikiengine/parse_mediawiki.php Sat Dec 12 15:43:23 2009 -0500 +++ b/includes/wikiengine/parse_mediawiki.php Sat Dec 12 15:44:36 2009 -0500 @@ -19,6 +19,8 @@ 'underline' => '/__(.+?)__/', 'externalwithtext' => '#\[((?:https?|irc|ftp)://.+?) (.+?)\]#', 'externalnotext' => '#\[((?:https?|irc|ftp)://.+?)\]#', + 'mailtonotext' => '#\[mailto:([^ \]]+?)\]#', + 'mailtowithtext' => '#\[mailto:([^ \]]+?) (.+?)\]#', 'hr' => '/^[-]{4,} *$/m' ); diff -r a1cca4472a58 -r c0e0a1787a63 includes/wikiengine/render_xhtml.php --- a/includes/wikiengine/render_xhtml.php Sat Dec 12 15:43:23 2009 -0500 +++ b/includes/wikiengine/render_xhtml.php Sat Dec 12 15:44:36 2009 -0500 @@ -144,6 +144,18 @@ return $text; } + + public function mailtonotext($pieces) + { + $pieces[2] = $pieces[1]; + return $this->mailtowithtext($pieces); + } + + public function mailtowithtext($pieces) + { + global $email; + return $email->encryptEmail($pieces[1], '', '', $pieces[2]); + } } // Alias internal link parsing to RenderMan's method diff -r a1cca4472a58 -r c0e0a1787a63 includes/wikiformat.php --- a/includes/wikiformat.php Sat Dec 12 15:43:23 2009 -0500 +++ b/includes/wikiformat.php Sat Dec 12 15:44:36 2009 -0500 @@ -70,6 +70,8 @@ 'underline', 'externalwithtext', 'externalnotext', + 'mailtowithtext', + 'mailtonotext', 'image', 'internallink', 'paragraph',