equal
deleted
inserted
replaced
1653 |
1653 |
1654 function acl_editor($parms = Array()) |
1654 function acl_editor($parms = Array()) |
1655 { |
1655 { |
1656 global $db, $session, $paths, $template, $plugins; // Common objects |
1656 global $db, $session, $paths, $template, $plugins; // Common objects |
1657 if(!$session->get_permissions('edit_acl') && $session->user_level < USER_LEVEL_ADMIN) |
1657 if(!$session->get_permissions('edit_acl') && $session->user_level < USER_LEVEL_ADMIN) |
1658 return 'Access is denied.'; |
1658 { |
|
1659 return Array( |
|
1660 'mode' => 'error', |
|
1661 'error' => 'You are not authorized to view or edit access control lists.' |
|
1662 ); |
|
1663 } |
1659 $parms['page_id'] = ( isset($parms['page_id']) ) ? $parms['page_id'] : false; |
1664 $parms['page_id'] = ( isset($parms['page_id']) ) ? $parms['page_id'] : false; |
1660 $parms['namespace'] = ( isset($parms['namespace']) ) ? $parms['namespace'] : false; |
1665 $parms['namespace'] = ( isset($parms['namespace']) ) ? $parms['namespace'] : false; |
1661 $page_id =& $parms['page_id']; |
1666 $page_id =& $parms['page_id']; |
1662 $namespace =& $parms['namespace']; |
1667 $namespace =& $parms['namespace']; |
1663 $page_where_clause = ( empty($page_id) || empty($namespace) ) ? 'AND a.page_id IS NULL AND a.namespace IS NULL' : 'AND a.page_id=\''.$db->escape($page_id).'\' AND a.namespace=\''.$db->escape($namespace).'\''; |
1668 $page_where_clause = ( empty($page_id) || empty($namespace) ) ? 'AND a.page_id IS NULL AND a.namespace IS NULL' : 'AND a.page_id=\''.$db->escape($page_id).'\' AND a.namespace=\''.$db->escape($namespace).'\''; |