"MDL-16650, fixed bug of returning raw urls"

This commit is contained in:
dongsheng
2008-10-23 04:26:48 +00:00
parent 9d83329215
commit 53c8ae53a7
+1 -1
View File
@@ -156,7 +156,7 @@ EOD;
$itemid = (int)substr(hexdec(uniqid()), 0, 9)+rand(1,100);
try {
if (preg_match('#(https?://([-\w\.]+)+(:\d+)?(/([\w/_\.]*(\?\S+)?)?)?)#', $path)) {
return array('url'=>$path);
echo json_encode(array('url'=>$path, 'id'=>$path, 'file'=>$path));
} else {
$info = repository_move_to_filepool($path, $title, $itemid);
if ($env == 'form'){