summaryrefslogtreecommitdiffstats
path: root/src/etc/inc/priv.inc
diff options
context:
space:
mode:
Diffstat (limited to 'src/etc/inc/priv.inc')
-rw-r--r--src/etc/inc/priv.inc36
1 files changed, 1 insertions, 35 deletions
diff --git a/src/etc/inc/priv.inc b/src/etc/inc/priv.inc
index a80e383..3e928a9 100644
--- a/src/etc/inc/priv.inc
+++ b/src/etc/inc/priv.inc
@@ -24,6 +24,7 @@
*/
require_once("priv.defs.inc");
+require_once("auth_func.inc");
/* Load and process custom privs. */
function get_priv_files($directory) {
@@ -89,41 +90,6 @@ function sort_privs(& $privs) {
uksort($privs, "cmp_privkeys");
}
-function cmp_page_matches($page, & $matches, $fullwc = true) {
-
-// $dbg_matches = implode(",", $matches);
-// log_error("debug: checking page {$page} match with {$dbg_matches}");
-
- if (!is_array($matches)) {
- return false;
- }
-
- /* skip any leading fwdslash */
- $test = strpos($page, "/");
- if ($test !== false && $test == 0) {
- $page = substr($page, 1);
- }
-
- /* look for a match */
- foreach ($matches as $match) {
-
- /* possibly ignore full wildcard match */
- if (!$fullwc && !strcmp($match , "*")) {
- continue;
- }
-
- /* compare exact or wildcard match */
- $match = str_replace(array(".", "*", "?"), array("\.", ".*", "\?"), $match);
- $result = preg_match("@^/{$match}$@", "/{$page}");
-
- if ($result) {
- return true;
- }
- }
-
- return false;
-}
-
function map_page_privname($page) {
global $priv_list;
OpenPOWER on IntegriCloud