Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 1.9
-
Component/s: Installation
-
Labels:None
-
Environment:WAMP + Vista
-
Database:Any
-
Affected Branches:MOODLE_19_STABLE
-
Fixed Branches:MOODLE_18_STABLE, MOODLE_19_STABLE
Description
Test:
- Take a clean Moodle or rename your config.old
- Run moodle (Installation script)
- Go through the installation to the "Server Checks" page.
- No icon image ( Firefox) or missing images (IE).
Cause:
weblib.php:
doc_link(...) {
...
if (empty($iconpath)) {
$iconpath = $CFG->httpswwwroot . '/pix/docs.gif'; // PROBLEM: $CFG->httpswwwroot isn't define in install script
}
...
}
Quick fix:
install.php:
case ENVIRONMENT: /// Environment checks
+ // Set CFG->httpswwwroot default value
+ // it is used to display icon image by doc_link() in weblib
+ global $CFG;
+ $CFG->httpswwwroot=$INSTALL['wwwrootform'];
Hi Jerome,
while your suggested patch will work perfectly I would suggest to use the one attached above. The reason for it is that we already have one "Fake settings" section in the installer and I think it's better to have all them together.
This should be applied to 18_STABLE, 19_STABLE and HEAD IMO
Also, I'd suggest to apply the same changes to the installers present at http://cvs.moodle.org/contrib/tools/m4w_builder/installer/ (to the 18, 19 and 20 ones). This only needs to be done in HEAD.
Those installers are the ones used to build the Windows packages and they are 90% equivalent to the distribution one, so as a general rule, it's nice to replicate changes from the distro to them.
Thanks!