includes/template.php
changeset 692 78473351a6c9
parent 689 13f8383a7538
child 699 c7d737202d59
equal deleted inserted replaced
691:dab7850c098d 692:78473351a6c9
   559         $ns = $lang->get('onpage_lbl_page_project');
   559         $ns = $lang->get('onpage_lbl_page_project');
   560         break;
   560         break;
   561       case "Category":
   561       case "Category":
   562         $ns = $lang->get('onpage_lbl_page_category');
   562         $ns = $lang->get('onpage_lbl_page_category');
   563         break;
   563         break;
   564       case "Anonymous":
   564       case "API":
   565         $ns = $lang->get('onpage_lbl_page_external');
   565         $ns = $lang->get('onpage_lbl_page_external');
   566         break;
   566         break;
   567     }
   567     }
   568     $this->namespace_string = $ns;
   568     $this->namespace_string = $ns;
   569     unset($ns);
   569     unset($ns);
   660         'TEXT' => $lang->get('onpage_btn_edit')
   660         'TEXT' => $lang->get('onpage_btn_edit')
   661         ));
   661         ));
   662       $tb .= $button->run();
   662       $tb .= $button->run();
   663     // View source button
   663     // View source button
   664     }
   664     }
   665     else if ( $session->check_acl_scope('view_source', $local_namespace) && $perms->get_permissions('view_source') && ( !$perms->get_permissions('edit_page') || !$perms->get_permissions('even_when_protected') && $paths->page_protected ) && $local_namespace != 'Anonymous') 
   665     else if ( $session->check_acl_scope('view_source', $local_namespace) && $perms->get_permissions('view_source') && ( !$perms->get_permissions('edit_page') || !$perms->get_permissions('even_when_protected') && $paths->page_protected ) && $local_namespace != 'API') 
   666     {
   666     {
   667       $button->assign_vars(array(
   667       $button->assign_vars(array(
   668         'FLAGS' => 'onclick="if ( !KILL_SWITCH ) { void(ajaxEditor()); return false; }" title="' . $lang->get('onpage_tip_viewsource') . '" accesskey="e"',
   668         'FLAGS' => 'onclick="if ( !KILL_SWITCH ) { void(ajaxEditor()); return false; }" title="' . $lang->get('onpage_tip_viewsource') . '" accesskey="e"',
   669         'PARENTFLAGS' => 'id="mdgToolbar_edit"',
   669         'PARENTFLAGS' => 'id="mdgToolbar_edit"',
   670         'HREF' => makeUrl($local_page, 'do=viewsource', true),
   670         'HREF' => makeUrl($local_page, 'do=viewsource', true),
   920       
   920       
   921       $this->toolbar_menu .= '<table border="0" cellspacing="0" cellpadding="0"><tr><td>'.$t0.'</td><td><input type="password" id="mdgPassSetField" size="10" /></td><td>'.$t.'</td></tr></table>';
   921       $this->toolbar_menu .= '<table border="0" cellspacing="0" cellpadding="0"><tr><td>'.$t0.'</td><td><input type="password" id="mdgPassSetField" size="10" /></td><td>'.$t.'</td></tr></table>';
   922     }
   922     }
   923     
   923     
   924     // Manage ACLs button
   924     // Manage ACLs button
   925     if ( !$paths->anonymous_page && $session->check_acl_scope('edit_acl', $local_namespace) && ( $perms->get_permissions('edit_acl') || ( defined('ACL_ALWAYS_ALLOW_ADMIN_EDIT_ACL') &&  $session->user_level >= USER_LEVEL_ADMIN ) ) )
   925     if ( !$paths->external_api_page && $session->check_acl_scope('edit_acl', $local_namespace) && ( $perms->get_permissions('edit_acl') || ( defined('ACL_ALWAYS_ALLOW_ADMIN_EDIT_ACL') &&  $session->user_level >= USER_LEVEL_ADMIN ) ) )
   926     {
   926     {
   927       $menubtn->assign_vars(array(
   927       $menubtn->assign_vars(array(
   928           'FLAGS' => 'onclick="if ( !KILL_SWITCH ) { var s = ajaxOpenACLManager(); console.debug(s); return false; }" title="' . $lang->get('onpage_tip_aclmanager') . '" accesskey="m"',
   928           'FLAGS' => 'onclick="if ( !KILL_SWITCH ) { var s = ajaxOpenACLManager(); console.debug(s); return false; }" title="' . $lang->get('onpage_tip_aclmanager') . '" accesskey="m"',
   929           'HREF'  => makeUrl($local_page, 'do=aclmanager', true),
   929           'HREF'  => makeUrl($local_page, 'do=aclmanager', true),
   930           'TEXT'  => $lang->get('onpage_btn_acl'),
   930           'TEXT'  => $lang->get('onpage_btn_acl'),