Browse Source

media create fix

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

Loading…
Cancel
Save