"MDL-13766, fixed context default value"
authorDongsheng Cai <unoter@gmail.com>
Tue, 16 Mar 2010 03:30:29 +0000 (03:30 +0000)
committerDongsheng Cai <unoter@gmail.com>
Tue, 16 Mar 2010 03:30:29 +0000 (03:30 +0000)
repository/filepicker.php
repository/repository_ajax.php

index 0726baa..c5ac613 100755 (executable)
@@ -39,7 +39,7 @@ $PAGE->set_pagelayout('embedded');
 
 // general parameters
 $action      = optional_param('action', '',        PARAM_ALPHA);
-$client_id   = optional_param('client_id', SITEID, PARAM_RAW);    // client ID
+$client_id   = optional_param('client_id', '', PARAM_RAW);    // client ID
 $itemid      = optional_param('itemid', '',        PARAM_INT);
 
 // parameters for repository
index 0a61eb8..82e40c0 100755 (executable)
@@ -36,8 +36,8 @@ require_login();
 $action    = optional_param('action', '', PARAM_ALPHA);
 $repo_id   = optional_param('repo_id', 1, PARAM_INT);           // repository ID
 $callback  = optional_param('callback', '', PARAM_CLEANHTML);
-$client_id = optional_param('client_id', SITEID, PARAM_RAW);    // client ID
-$contextid = optional_param('ctx_id', SITEID, PARAM_INT);       // context ID
+$client_id = optional_param('client_id', '', PARAM_RAW);        // client ID
+$contextid = optional_param('ctx_id', SYSCONTEXTID, PARAM_INT);       // context ID
 $env       = optional_param('env', 'filepicker', PARAM_ALPHA);  // opened in editor or moodleform
 $file      = optional_param('file', '', PARAM_RAW);             // file to download
 $itemid    = optional_param('itemid', 0, PARAM_INT);