From: dongsheng Date: Thu, 23 Oct 2008 04:26:48 +0000 (+0000) Subject: "MDL-16650, fixed bug of returning raw urls" X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=53c8ae53a7c9a2dedc71f203678c13e12970a6ea;p=moodle.git "MDL-16650, fixed bug of returning raw urls" --- diff --git a/repository/ws.php b/repository/ws.php index cc5924b366..66afe20876 100644 --- a/repository/ws.php +++ b/repository/ws.php @@ -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'){