equal
deleted
inserted
replaced
127 |
127 |
128 $filename = $db->escape($filename); |
128 $filename = $db->escape($filename); |
129 $ext = substr($filename, strrpos($filename, '.'), strlen($filename)); |
129 $ext = substr($filename, strrpos($filename, '.'), strlen($filename)); |
130 $flen = filesize($file['tmp_name']); |
130 $flen = filesize($file['tmp_name']); |
131 |
131 |
132 $comments = $db->escape(RenderMan::strip_php($_POST['comments'])); |
132 $comments = ( isset($_POST['update']) ) ? $db->escape($_POST['comments']) : $db->escape(RenderMan::preprocess_text($_POST['comments'], false, false)); |
133 $chartag = sha1(microtime()); |
133 $chartag = sha1(microtime()); |
134 $urln = str_replace(' ', '_', $filename); |
134 $urln = str_replace(' ', '_', $filename); |
135 |
135 |
136 $key = md5($filename . '_' . file_get_contents($file['tmp_name'])); |
136 $key = md5($filename . '_' . file_get_contents($file['tmp_name'])); |
137 $targetname = ENANO_ROOT . '/files/' . $key . '_' . $utime . $ext; |
137 $targetname = ENANO_ROOT . '/files/' . $key . '_' . $utime . $ext; |