summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--inc/functions.php20
-rw-r--r--inc/mod.php20
2 files changed, 20 insertions, 20 deletions
diff --git a/inc/functions.php b/inc/functions.php
index 3d4b837b..ea050066 100644
--- a/inc/functions.php
+++ b/inc/functions.php
@@ -404,6 +404,26 @@
return $ret;
}
+ function hasPermission($action = null, $board = null, $_mod = null) {
+ global $config;
+
+ if(isset($_mod))
+ $mod = &$_mod;
+ else
+ global $mod;
+
+ if(isset($action) && $mod['type'] < $action)
+ return false;
+
+ if(!isset($board))
+ return true;
+
+ if(!$config['mod']['skip_per_board'] && !in_array('*', $mod['boards']) && !in_array($board, $mod['boards']))
+ return false;
+
+ return true;
+ }
+
function listBoards() {
global $config;
diff --git a/inc/mod.php b/inc/mod.php
index caae570b..556a274e 100644
--- a/inc/mod.php
+++ b/inc/mod.php
@@ -25,26 +25,6 @@
return $hash;
}
- function hasPermission($action = null, $board = null, $_mod = null) {
- global $config;
-
- if(isset($_mod))
- $mod = &$_mod;
- else
- global $mod;
-
- if(isset($action) && $mod['type'] < $action)
- return false;
-
- if(!isset($board))
- return true;
-
- if(!$config['mod']['skip_per_board'] && !in_array('*', $mod['boards']) && !in_array($board, $mod['boards']))
- return false;
-
- return true;
- }
-
function login($username, $password, $makehash=true) {
global $mod;