# HG changeset patch # User Dan # Date 1251178991 14400 # Node ID faef5e62e1e0bb40d4b9a55f78fb12a821cb7042 # Parent 6358f769ecb12b84de7c67dc0edd4a8b6e6cc91f Fixed a couple bugs with read-only mode and protected pages in the AJAX editor diff -r 6358f769ecb1 -r faef5e62e1e0 ajax.php --- a/ajax.php Wed Aug 19 01:28:47 2009 -0400 +++ b/ajax.php Tue Aug 25 01:43:11 2009 -0400 @@ -61,7 +61,7 @@ $src = ''; } - $auth_edit = ( $session->get_permissions('edit_page') && ( $session->get_permissions('even_when_protected') || !$paths->page_protected ) ); + $auth_edit = ( $session->get_permissions('edit_page') && ( $session->get_permissions('even_when_protected') || !$page->ns->page_protected ) ); $auth_wysiwyg = ( $session->get_permissions('edit_wysiwyg') ); $return = array( diff -r 6358f769ecb1 -r faef5e62e1e0 includes/clientside/static/editor.js --- a/includes/clientside/static/editor.js Wed Aug 19 01:28:47 2009 -0400 +++ b/includes/clientside/static/editor.js Tue Aug 25 01:43:11 2009 -0400 @@ -441,7 +441,8 @@ form.appendChild(preview_anchor); form.appendChild(preview_container); form.appendChild(ta_wrapper); - form.appendChild(tblholder); + if ( !readonly ) + form.appendChild(tblholder); form.innerHTML += '