1
0
mirror of https://github.com/vichan-devel/vichan.git synced 2024-11-30 18:24:29 +01:00

Check if mod post

This commit is contained in:
Savetheinternet 2011-01-02 21:10:33 +11:00
parent 82557e2c12
commit 13cd22e324

View File

@ -83,6 +83,15 @@
$post['password'] = $_POST['password'];
$post['filename'] = $_FILES['file']['name'];
$post['has_file'] = $OP || !empty($_FILES['file']['tmp_name']);
$post['mod'] = isset($_POST['mod']) && $_POST['mod'];
if($post['mod']) {
require 'inc/mod.php';
if(!$mod) {
// Liar. You're not a mod.
error(ERROR_NOTAMOD);
}
}
if($post['has_file']) {
$size = $_FILES['file']['size'];