Permalink
Browse files

MDL-14865 DOn't pass CFG to get_string

  • Loading branch information...
1 parent b0e592a commit 3883481bfdfd3bf44b53c358d5275eead18d26f5 moodler committed May 16, 2008
Showing with 5 additions and 2 deletions.
  1. +5 −2 mod/resource/type/file/resource.class.php
@@ -24,6 +24,9 @@ function set_parameters() {
$site = get_site();
+ $littlecfg = new object; // to avoid some notices later
+ $littlecfg->wwwroot = $CFG->wwwroot;
+
$this->parameters = array(
'label2' => array('langstr' => "",
@@ -61,8 +64,8 @@ function set_parameters() {
'value' => current_language()),
'sitename' => array('langstr' => get_string('fullsitename'),
'value' => format_string($site->fullname)),
- 'serverurl' => array('langstr' => get_string('serverurl', 'resource', $CFG),
- 'value' => $CFG->wwwroot),
+ 'serverurl' => array('langstr' => get_string('serverurl', 'resource', $littlecfg),
+ 'value' => $littlecfg->wwwroot),
'currenttime' => array('langstr' => get_string('time'),
'value' => time()),
'encryptedcode' => array('langstr' => get_string('encryptedcode'),

0 comments on commit 3883481

Please sign in to comment.