98 Commits

Author SHA1 Message Date
Simey Lameze
f88bcdb041 MDL-72984 cli: add support email option to cli install 2021-12-20 13:24:38 +08:00
Sara Arjona
42895003e4 MDL-73145 install: Apply site preset if defined in config
A new setting, $CFG->setsitepresetduringinstall, has been added to
config file, to let admins define the site admin preset to be applied
during the Moodle installation.

Besides, a new parameter, "--sitepreset" has been also added
to admin/cli/install.php, to let define it too when running the
upgrade process using CLI.
2021-12-09 09:48:44 +01:00
Simey Lameze
d208ffb0e2 MDL-65453 core: fix behaviour of --skip-database option on install 2020-07-28 11:21:35 +08:00
Charles Fulton
66ba391e82 MDL-58931 dml: add support for aurora mysql 2020-07-01 22:56:20 +02:00
David Mudrák
469d4b7f35 MDL-67250 setup: Revert removal of the httpswwwroot setting
It is still used widely in the plugins that would stop working suddenly
without being warned via a debugging message. We must keep it forever as
an alias for the wwwroot.
2019-11-13 19:58:10 +01:00
Shamim Rezaie
fffb043eae MDL-43189 core: improve validating db settings during cli install 2019-11-01 15:44:40 +08:00
Jun Pataleta
9320787005 MDL-46267 core: Remove $CFG->httpswwwroot
* It's unnecessary since $CFG->loginhttps has already been removed and
  it's no longer being used in core anymore.
2019-07-22 10:59:42 +08:00
Ryan Wyllie
c32af3a710 MDL-65446 admin: fix admin email option for cli install 2019-04-30 13:29:56 +08:00
Matteo Scaramuccia
ef844148a9 MDL-60923 backup: Added $CFG->backuptempdir
The new setting will allow to host the temporary backup files
into a specific target directory. Defaults to '$CFG->tempdir/backup'.

Calling make_backup_temp_directory() checks that the required sub-directory
will be properly created under the new target directory.
2018-04-16 23:50:28 +02:00
Jake Dallimore
811808b3d2 MDL-59581 database: removal of mssql bits from admin/ 2018-04-09 01:59:06 +02:00
David Monllao
f510788b44 Merge branch 'MDL-59150-master-3' of git://github.com/ryanwyllie/moodle 2017-07-18 08:27:13 +02:00
Ryan Wyllie
0f268f5db9 MDL-59150 admin: build site theme after CLI install or upgrade 2017-07-18 06:13:07 +00:00
Dan Poltawski
64e57937be MDL-57432 lib: unify PHP version checks
* Introduce a new php compatible library which can be used
  early in execution, without Moodle dependencies
* Use it where we previously had hardcoded checks

This was originally suggested in MDL-39007.
2017-07-10 09:16:55 +01:00
Eloy Lafuente (stronk7)
ae96cf6246 MDL-53019 php: bump all harcoded versions to new 5.6.5 requirement
Moodle 3.2 and up will require PHP >= 5.6.5. Hopefully some day we'll
have this centralized with MDL-39007, just it's not done yet.

Thanks to Stephen Bourget for raising this!
2016-07-05 01:50:43 +02:00
Russell Smith
1fcf0ca8a5 MDL-35628 performance: Remove dirname() where possible.
dirname() is a slow function compared with __DIR__ and using
'/../'.  Moodle has a large number of legacy files that are included
each time a page loads and is not able to use an autoloader as it is
functional code.  This allows those required includes to perform as
best as possible in this situation.
2016-06-10 08:06:49 +10:00
David Mudrák
6ef02f8479 MDL-51261 admin: Add option to define upgradekey via cli installer 2015-09-24 21:02:33 +02:00
David Mudrák
7d62bc2417 MDL-51403 install: Improve the language validation in the CLI installer
There are two essential improvements here. Firstly, by replacing the
file_exists() check with array_key_exists() we make sure that only
actual language code will be written into the config.php file (and not
the empty value in case of input that does not pass the PARAM_SAFEDIR
cleaning).

Additionally, we no longer display the full list of available languages
by default. The list can be displayed in the interactive mode by typing
the ? character instead of the language code. This makes the overall
interface cleaner, does not cause the header information (such as the
Moodle version) to scroll away and makes the nice cli logo more visible
(which was the main motivation for the whole patch anyway ;-).
2015-09-17 21:06:32 +02:00
Charles Fulton
096fd59653 MDL-46167 admin_cli: allow skipping of database installation 2015-07-04 19:15:50 +00:00
David Mudrák
394034ec6e MDL-50631 cli: Display the Moodle ASCII logo in the CLI installer header 2015-06-17 22:48:14 +02:00
John Okely
65903c7607 MDL-49842 install: Set front page summary to '' after cli install
This is to prevent front page summary from appearing as a 'new setting'
after the first upgrade of a site installed via cli.
2015-04-16 11:49:22 +08:00
Petr Skoda
d6e7a63d9a MDL-49684 timezones: rewrite timezone support
This patch replaces all homegrown timezone
stuff with standard PHP date/time code.

The main change is the introduction of core_date
class that returns normalised user and server
timezones. From now on nobody should be using
$CFG->timezone or $user->timezone directly!

Other new features and fixes:
* admins are prompted for timezone during install
* editing of other users is finally fixed
* timezones are displayed in user profile
* new $this->setTimezone() in phpunit
* time locale is now automatically reset in phpunit
* timezone is now automatically reset in phpunit
* phpunit has Australia/Perth as default timezone
2015-04-06 13:53:51 +12:00
Andrew Nicols
da992717f4 MDL-28513 install: Add adminemail to the CLI installers 2015-01-21 09:42:51 +08:00
Petr Skoda
2e00d01db4 MDL-46099 session: fix use of references for session globals
This reverses the references used for global $USER and $SESSION,
the reason is that PHP does not allow references to references.
$USER is a reference to $GLOBALS['USER'] which means we cannot
put any references to it. Solution is to store the current user and session
objects in $GLOBALS['USER'] and $GLOBALS['SESSIOn'] are reference
them in $_SESSION.

This patch makes the session code behave the same way in CLI,
phpunit and normal web requests - this allows use to finally
unit test most aspects of the session code in Moodle.
2014-07-01 08:38:00 +12:00
Petr Škoda
dbe0203ba8 MDL-42931 fix hardcoded PHP version tests for 2.7 2013-12-13 14:04:24 +08:00
Petr Škoda
e87214bda7 MDL-42078 multiple uninstall improvements and cleanup
Includes:
* update checker refactored to \core\update\ namespace
* plugininfo classes refactored to \core\plugininfo\ namespace
* plugin_manager renamed to core_plugin_manager
* redirect back to original page after plugin uninstall
* fixed assign subplugin uninstall
* move assign subplugins under the assignment in admin tree
* fixed plugininfo for all question related plugin types
* auth uninstall support
* added missing block dependencies
* added theme uninstall
* subplugin types are following the plugin on plugin overview page
* several performance improvements in plugin manager
* new warnigns when plugininfo are outdated or missing
* multiple fixes and other improvements
2013-10-07 13:10:36 +02:00
Petr Škoda
1a4621d8e5 MDL-31501 fake requried globals in both installers 2013-09-23 21:46:05 +02:00
Sam Hemelryk
98d696b6d5 MDL-31501 session: fixed missing autoloader during install 2013-09-23 15:38:45 +12:00
Dan Poltawski
6f44a73369 Merge branch 'w33_MDL-39474_m26_debugdeveloper' of https://github.com/skodak/moodle
Conflicts:
	lib/upgrade.txt
2013-08-20 11:42:03 +08:00
Petr Škoda
96f81ea385 MDL-39474 introduce $CFG->debugdeveloper and cleanup $CFG init 2013-08-12 13:01:47 +02:00
Petr Škoda
99a9d8d937 MDL-41019 refactor string managers to new core_ classes 2013-08-08 09:10:25 +02:00
Petr Škoda
7f0ffc544a MDL-41020 fix installer notices 2013-08-04 10:18:10 +02:00
Petr Škoda
17601a7e12 MDL-39985 add explicit MariaDB support 2013-07-24 10:45:20 +08:00
Petr Škoda
85b3806114 MDL-40545 add $CFG->localcachedir intended for local caching on cluster nodes 2013-07-20 14:10:25 +02:00
Petr Škoda
d7245e3400 MDL-40475 add alternative component cache location and other improvements
Improvements include:
* Alternative location might be useful when server administrator wants to maintain
  a local copy of component cache instead of using shared $CFG->cachedir.
* Component caching is now enabled in behat tests which should improve performance.
* Standardised ignoring of component caching.
* Fixed debug mode in ABORT_AFTER_CONFIG scripts.
* General documentation improvements.
2013-07-12 13:05:41 +02:00
Petr Škoda
c05a50992e MDL-40415 add explicit OPcache support 2013-07-04 19:32:26 +02:00
Petr Škoda
d534708fd3 MDL-40299 textlib conversion to core_text and core_collator 2013-06-27 22:18:57 +02:00
Petr Škoda
1abf2f6acc MDL-39854 fix installer regression caused by new core_component 2013-06-18 10:31:26 +02:00
Dan Poltawski
3d164e1ef4 Revert "MDL-39474 Library: Make a fast way to check developer debug mode"
There were multiple problems discovered.

This reverts commit 5c92e7a740fbce4184cf204a11ebbb6b918a376b.

Conflicts:
	admin/cli/install.php
2013-06-18 15:07:22 +08:00
Sam Hemelryk
5c8cfccad3 Merge branch 'w25_MDL-26455_m26_installport' of git://github.com/skodak/moodle
Conflicts:
	admin/cli/install.php
2013-06-18 14:29:08 +12:00
Petr Škoda
1826d0ead6 MDL-26455 add support for custom DB port and socket in CLI installer 2013-06-15 15:07:28 +02:00
sam marshall
5c92e7a740 MDL-39474 Library: Make a fast way to check developer debug mode 2013-06-11 16:29:00 +01:00
Frederic Massart
cf4cef7d76 MDL-39484 core: Undefined ostype during installation process 2013-05-06 10:06:09 +08:00
Petr Škoda
e2e35e71f9 MDL-39343 disable all caching in install and upgrades
This should resolve all problem on developer machines when switching branches or when restoring previous Moodle databases. It also prevents any potential problems during upgrades such as concurrent DB modification and resolves chicken egg problems in future caching upgrades.
2013-04-30 10:27:34 +02:00
Eloy Lafuente (stronk7)
0fd23b76de MDL-39006 environment: raise all uses of 5.3.2 to 5.3.3 2013-04-07 18:32:15 +02:00
Sam Hemelryk
94ef67cf5f MDL-36466 cache: tidy up after review 2012-11-26 08:12:00 +13:00
Sam Hemelryk
3308259062 MDL-36466 cache: disabled caching during installation and upgrade 2012-11-26 08:12:00 +13:00
Sam Hemelryk
468cc57297 MDL-34342 cache: Added missing include and fixed old lang manager setting 2012-11-06 17:24:20 +13:00
Petr Škoda
960b65290a MDL-35739 show langs on separate lines in CLI installer
This fixes column width issues and compatibility with RTL languages.
2012-10-07 21:03:44 +02:00
Aparup Banerjee
1adb060a87 Merge branch 'MDL-32329-all-plugins-ok' of git://github.com/mudrd8mz/moodle 2012-05-30 16:48:23 +08:00
David Mudrak
f1753a5b10 MDL-32329 CLI install and upgrade scripts display plugins with unsatisfied dependencies 2012-05-30 10:35:28 +02:00