ajax.php
changeset 389 da3bb3e99323
parent 387 92664d2efab8
child 408 7ecbe721217c
equal deleted inserted replaced
388:9829ca63b53a 389:da3bb3e99323
   114         $allowed = false;
   114         $allowed = false;
   115         $src = '';
   115         $src = '';
   116       }
   116       }
   117       
   117       
   118       $auth_edit = ( $session->get_permissions('edit_page') && ( $session->get_permissions('even_when_protected') || !$paths->page_protected ) );
   118       $auth_edit = ( $session->get_permissions('edit_page') && ( $session->get_permissions('even_when_protected') || !$paths->page_protected ) );
       
   119       $auth_wysiwyg = ( $session->get_permissions('edit_wysiwyg') );
   119       
   120       
   120       $return = array(
   121       $return = array(
   121           'mode' => 'editor',
   122           'mode' => 'editor',
   122           'src' => $src,
   123           'src' => $src,
   123           'auth_view_source' => $allowed,
   124           'auth_view_source' => $allowed,
   124           'auth_edit' => $auth_edit,
   125           'auth_edit' => $auth_edit,
   125           'time' => time(),
   126           'time' => time(),
   126           'require_captcha' => false,
   127           'require_captcha' => false,
       
   128           'allow_wysiwyg' => $auth_wysiwyg
   127         );
   129         );
   128       
   130       
   129       if ( $auth_edit && !$session->user_logged_in && getConfig('guest_edit_require_captcha') == '1' )
   131       if ( $auth_edit && !$session->user_logged_in && getConfig('guest_edit_require_captcha') == '1' )
   130       {
   132       {
   131         $return['require_captcha'] = true;
   133         $return['require_captcha'] = true;