Fiksa renameing x2 da det er skrevet mongokode flere plasser

This commit is contained in:
Paal Braathen committed 2012-01-05 19:40:48 +01:00
1 parent 58241fc900
commit b6b0b73100
1 file changed
+3 -2
+3 -2
View File
@@ -142,8 +142,9 @@ class Concert {
$this->id = getNextId("program");
if($_FILES['userfile']['error'] != 4){
$temp_name = new_file($_FILES['userfile'], "program");
rename_file($temp_name, $this->id, "program");
$this->picture = $this->id.substr($temp_name, -4);
rename_file($temp_name, $this->id, "program");
$ext = strtolower( pathinfo($temp_name, PATHINFO_EXTENSION) );
$this->picture = $this->id . "." . $ext;
} else {
$this->picture = "0";
}