Browse Source

media create fix

master
Robin Thoni 9 years ago
parent
commit
6e9e82516d
1 changed files with 2 additions and 1 deletions
  1. 2
    1
      status.php

+ 2
- 1
status.php View File

@@ -29,7 +29,7 @@ function status_create()
29 29
       && getimagesize($_FILES["media"]["tmp_name"]) !== false)
30 30
   {
31 31
     global $media_path;
32
-    $media = dechex(microtime());
32
+    $media = dechex(microtime(true)) . dechex(rand());
33 33
     move_uploaded_file($_FILES["media"]["tmp_name"], $media_path . $media);
34 34
   }
35 35
 
@@ -47,6 +47,7 @@ function status_create()
47 47
 
48 48
   $date = new DateTime($s["date"]);
49 49
 
50
+  global $media_url;
50 51
   echo json_encode(array("status" => $s["status"],
51 52
     "user_id" => intval($u["id"]),
52 53
     "creation_date" => $date->format(DateTime::ISO8601),

Loading…
Cancel
Save