Issue Details (XML | Word | Printable)

Key: MDL-10275
Type: Sub-task Sub-task
Status: Resolved Resolved
Resolution: Fixed
Priority: Minor Minor
Assignee: Petr Skoda
Reporter: Dilan Anuruddha Karanachcharighe
Votes: 0
Watchers: 0
Operations

Add/Edit UI Mockup to this issue
If you were logged in you would be able to see more operations.
Moodle
MDL-17458

refactoring install.php

Created: 27/Jun/07 07:06 PM   Updated: 07/Feb/09 07:35 PM
Return to search
Component/s: Unknown
Affects Version/s: 1.8.1
Fix Version/s: 2.0

Environment: All environment that support PHP

Participants: Dilan Anuruddha Karanachcharighe and Petr Skoda
Security Level: None
Resolved date: 07/Feb/09
Affected Branches: MOODLE_18_STABLE
Fixed Branches: MOODLE_20_STABLE


 Description  « Hide
This will try to extract the functionality out of install.php file and put it in the libinstall.php. This enables cli installer reuse that code. At the moment refactoring will remove implementation like, configuring the database, configuring the folders, etc. This file will have an effect in install.php since it needed to be changed to accommodate the refactoring.

 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
Petr Skoda made changes - 11/Jan/09 01:15 AM
Field Original Value New Value
Parent Issue MDL-9995 [ MDL-9995 ] MDL-17458 [ MDL-17458 ]
Petr Skoda made changes - 11/Jan/09 01:15 AM
Assignee Martin Dougiamas [ dougiamas ] Petr ?koda [ skodak ]
Petr Skoda committed 3 files to 'Moodle CVS' - 01/Feb/09 09:52 PM
MDL-10275 moving all installation time environment tests into /admin/index.php - this will simplify install.php a LOT and will make installation/upgrade more consistent + fixed a bug in enviroment if docroot not set
MODIFY lib/upgradelib.php   Rev. 1.3    (+10 -1 lines)
MODIFY admin/index.php   Rev. 1.367    (+26 -19 lines)
MODIFY lib/environmentlib.php   Rev. 1.33    (+10 -4 lines)
Petr Skoda committed 5 files to 'Moodle CVS' - 01/Feb/09 10:37 PM
MDL-10275 added fatal PHP config setting test on each page, replaces some tests done in installer
MODIFY admin/index.php   Rev. 1.368    (+4 -9 lines)
MODIFY lib/adminlib.php   Rev. 1.322    (+3 -5 lines)
MODIFY lang/en_utf8/admin.php   Rev. 1.264    (+2 -0 lines)
MODIFY lib/setuplib.php   Rev. 1.47    (+19 -1 lines)
MODIFY lib/setup.php   Rev. 1.262    (+4 -7 lines)
Mitsuhiro Yoshida committed 4 files to 'Lang CVS' - 02/Feb/09 01:07 AM
MDL-17458 Translated new strings for admin, debug and error messages.
MDL-10275 Translated new strings for admin.
MODIFY ja_utf8/admin.php   Rev. 1.337    (+3 -0 lines)
MODIFY ja_utf8/error.php   Rev. 1.119    (+8 -7 lines)
MODIFY ja_utf8/debug.php   Rev. 1.18    (+16 -16 lines)
MODIFY ja_utf8/README   Rev. 1.933    (+1 -1 lines)
Petr Skoda committed 3 files to 'Moodle CVS' - 02/Feb/09 01:20 AM
MDL-10275 moved the rest of environment tests from install.php to admin/index.php; please note that there is no need to update installer lacg packs becuase install.php will not have environment checks anymore soon ;-)
MODIFY lang/en_utf8/admin.php   Rev. 1.266    (+7 -0 lines)
MODIFY lib/environmentlib.php   Rev. 1.34    (+89 -3 lines)
MODIFY admin/environment.xml   Rev. 1.41    (+21 -4 lines)
Petr Skoda committed 2 files to 'Moodle CVS' on branch 'MOODLE_19_STABLE' - 02/Feb/09 01:22 AM
MDL-10275 backporting gd environment test
MODIFY lang/en_utf8/admin.php   Rev. 1.154.2.79    (+1 -0 lines)
MODIFY admin/environment.xml   Rev. 1.24.2.14    (+21 -4 lines)
Petr Skoda committed 2 files to 'Moodle CVS' on branch 'MOODLE_18_STABLE' - 02/Feb/09 01:27 AM
MDL-10275 backporting gd environment test
MODIFY lang/en_utf8/admin.php   Rev. 1.103.2.32    (+2 -1 lines)
MODIFY admin/environment.xml   Rev. 1.18.2.12    (+21 -4 lines)
Petr Skoda committed 1 file to 'Moodle CVS' - 02/Feb/09 01:33 AM
MDL-10275 temporarily disabling old installer, stay tuned - new one will be ready soon ;-)
MODIFY install.php   Rev. 1.114    (+3 -1 lines)
Petr Skoda committed 1 file to 'Moodle CVS' - 02/Feb/09 01:36 AM
MDL-10275 fixed string case
MODIFY lang/en_utf8/admin.php   Rev. 1.267    (+1 -1 lines)
Petr Skoda added a comment - 03/Feb/09 04:50 AM
some info for Eloy because he seems more than surprised and too happy with the old installer

I am in a process of:
1/ moving configuration checks from install.php into environment - new section PHP_SETTINGS in environment.xml and setup.php - why?? because many ppl are reporting problems when configuration changes

  • critical PHP settings are now checked on each page see lbi/setuplib.php function setup_validate_php_configuration() - magic_quotes are deadly for security reasons, session auto start breaks sessions completely and magic quotes runtime break everything too
  • less critical and recommended settings were moved into environment.xml - these things need not be installer at all, users should be remonded during each upgrade that something is wrong or not optimal
  • test php version and curl ext and show error only if it fails - this way most ppl will see only environment tests from admin/index.php instead of incomplete two tests in current installer

2/ moving environment test from install.php to admin/index.php - problems here are two - first all strings in environment test need to go into install lang packs, when creating config.php manually the environment tests were not executed at all (critical)

3/ installation strings are getting bigger and bigger - seems easier to download installer right after successful directory selection; this way we can use normal string handling in db selection/configuration/testing etc., this way we will need only some 15 strings instead of 50+ in install/en_utf8/installer.php

4/ enabling full debug and error dispaly in installer + tweaking all strings - this could prevent very many installer bug reports finally


Mitsuhiro Yoshida committed 2 files to 'Lang CVS' - 03/Feb/09 08:31 AM
MDL-10275 Translated new strings for environment tests.
MODIFY ja_utf8/admin.php   Rev. 1.339    (+7 -0 lines)
MODIFY ja_utf8/README   Rev. 1.934    (+1 -1 lines)
martignoni committed 1 file to 'Lang CVS' - 06/Feb/09 03:59 AM
MDL-10275 New strings
MODIFY fr_utf8/admin.php   Rev. 1.344    (+3 -1 lines)
martignoni committed 1 file to 'Lang CVS' - 06/Feb/09 04:18 AM
MDL-10275 Strings added
MODIFY fr_utf8/admin.php   Rev. 1.346    (+8 -1 lines)
Petr Skoda added a comment - 07/Feb/09 07:35 PM
the new code should be now fully refactored - going to work on cli installer soon
thanks

Petr Skoda made changes - 07/Feb/09 07:35 PM
Fix Version/s 2.0 [ 10122 ]
Resolution Fixed [ 1 ]
Status Open [ 1 ] Resolved [ 5 ]