equal
deleted
inserted
replaced
106 |
106 |
107 $filename = $db->escape(sanitize_page_id($filename)); |
107 $filename = $db->escape(sanitize_page_id($filename)); |
108 $ext = substr($filename, strrpos($filename, '.'), strlen($filename)); |
108 $ext = substr($filename, strrpos($filename, '.'), strlen($filename)); |
109 $flen = filesize($file['tmp_name']); |
109 $flen = filesize($file['tmp_name']); |
110 |
110 |
111 $comments = ( isset($_POST['update']) ) ? $db->escape($_POST['comments']) : $db->escape(RenderMan::preprocess_text($_POST['comments'], false, false)); |
111 $perms = $session->fetch_page_acl($filename, 'File'); |
|
112 $comments = ( isset($_POST['update']) ) ? $db->escape($_POST['comments']) : $db->escape(RenderMan::preprocess_text($_POST['comments'], false, false, true, $perms)); |
112 $chartag = sha1(microtime()); |
113 $chartag = sha1(microtime()); |
113 $urln = str_replace(' ', '_', $filename); |
114 $urln = str_replace(' ', '_', $filename); |
114 |
115 |
115 $key = md5($filename . '_' . ( function_exists('md5_file') ? md5_file($file['tmp_name']) : file_get_contents($file['tmp_name']))); |
116 $key = md5($filename . '_' . ( function_exists('md5_file') ? md5_file($file['tmp_name']) : file_get_contents($file['tmp_name']))); |
116 $targetname = ENANO_ROOT . '/files/' . $key . $ext; |
117 $targetname = ENANO_ROOT . '/files/' . $key . $ext; |