38 Commits

Author SHA1 Message Date
Brendan Heywood
8918cc75c1 MDL-65208 admin: Add upgrade cli --is-pending option 2019-06-03 14:33:07 +10:00
Matt Porritt
d5adb60fa3 MDL-62777 Administration: CLI upgrade new setting notification
During a CLI upgrade when there are new settings in core or in
a plugin, the settings are set to the defined defaults
automatically. There is no ouput shown on the CLI about which
new settings have been introduced or what default values the
setting are set to.

This patch outputs the name of the new setting and what the
default value being is set is to the CLI during an upgrade.
Objects and arrays are expanded into a human readable format.
This plugin also makes the function that sets the defaults to
be more robust so it isno longer required to be called multiple
times to ensure all settings are set.
2018-10-22 14:28:06 +11:00
Luca Bösch
c3c8cc40be MDL-39035 admin: show old and new version after upgrade in CLI 2018-04-12 18:02:12 +02:00
Ryan Wyllie
0f268f5db9 MDL-59150 admin: build site theme after CLI install or upgrade 2017-07-18 06:13:07 +00: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
Jun Pataleta
54285c3ff5 MDL-53260 upgrade: Fix lang help text description. 2016-03-23 14:13:36 +08:00
Jun Pataleta
830f8bc780 MDL-53260 upgrade: Make lang option default to the site language 2016-03-21 15:08:59 +08:00
Nadav Kavalerchik
14aaa2d75b MDL-53260 upgrade: Option to display CLI upgrade messages in English 2016-03-21 11:59:50 +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
d79d5ac276 MDL-31501 rework user session architecture
List of changes:
 * New OOP API using PHP namespace \core\session\.
 * All handlers now update the sessions table consistently.
 * Experimental DB session support in Oracle.
 * Full support for session file handler (filesystem locking required).
 * New option for alternative session directory.
 * Official memcached session handler support.
 * Workaround for memcached version with non-functional gc.
 * Improved security - forced session id regeneration.
 * Improved compatibility with recent PHP releases.
 * Fixed borked CSS during install in debug mode.
 * Switched to file based sessions in new installs.
 * DB session setting disappears if DB does not support sessions.
 * DB session setting disappears if session handler specified in config.php.
 * Fast purging of sessions used in request only.
 * No legacy distinction -  file, database and memcached support the same functionality.
 * Session handler name included in performance info.
 * Fixed user_loggedin and user_loggedout event triggering.
 * Other minor bugfixing and improvements.
 * Fixed database session segfault if MUC disposed before $DB.

Limitations:
 * Session access time is now updated right after session start.
 * Support for $CFG->sessionlockloggedinonly was removed.
 * First request does not update userid in sessions table.
 * The timeouts may break badly if server hosting forces PHP.ini session settings.
 * The session GC is a lot slower, we do not rely on external session timeouts.
 * There cannot be any hooks triggered at the session write time.
 * File and memcached handlers do not support session lock acquire timeouts.
 * Some low level PHP session functions can not be used directly in Moodle code.
2013-09-21 13:11:56 +02:00
Petr Škoda
c05a50992e MDL-40415 add explicit OPcache support 2013-07-04 19:32:26 +02:00
Sam Hemelryk
b0dd08dd63 MDL-39430 cache: gets purged by force during upgrade and install 2013-05-09 10:42:21 +12: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
Petr Škoda
550790153a MDL-35904 send notifications from main admin and improve coding style 2012-10-13 09:52:45 +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
David Mudrak
2da7fbc0c2 MDL-33382 CLI install and upgrade scripts display hint on --allow-unstable in non-interactive mode 2012-05-28 10:59:22 +02:00
Aparup Banerjee
ed01233ace MDL-28134 General : added branch variable to version.php for reliable docs versioned links. 2012-05-03 16:30:20 +08:00
Eloy Lafuente (stronk7)
daf714ef12 MDL-31832 CLI upgrade will return 0 exit status if no upgrade is needed
Discussed with David, both points were valid but finally
we agreed about to consider the "no upgrade needed" exit
a normal/succesful one, mainly because it keeps previous
behavior the same (exit non-zero only for real errors).
2012-03-07 10:58:56 +01:00
David Mudrak
91c038f932 MDL-31832 CLI upgrade checks if the upgrade is actually needed 2012-03-07 10:58:07 +01:00
Petr Skoda
c1f55426ee MDL-29474 fix cli upgrade regression 2011-10-27 14:04:19 +02:00
Tim Hunt
777781d16e MDL-29474 plugin dependencies: fix misspelling dependancies. 2011-10-20 11:13:45 +01:00
Tim Hunt
faadd32696 MDL-29474 prevent install/upgrade if plugin dependancies not met. 2011-10-20 11:13:41 +01:00
Tim Hunt
cc359566fe MDL-29474 admin index/plugins/environment pages: all ouptut code -> renderer. 2011-10-20 11:13:39 +01:00
Petr Skoda
1c71748dd1 MDL-27121 fix incorrect check_moodle_environment() version parameter
This prevents Moodle 2.0 from using environment info for 2.1 in the installer and CLI upgrade.
2011-04-09 17:43:52 +02:00
David Mudrak
1a4d6a5b60 MDL-26609 Display information about the current version during the upgrade
As Eloy Lafuente noticed in the tracker discussion, we display the
information about the current version in the browser window title but
not at the screen itself. The patch fixes that by displaying the
information in the page heading instead of the page title.

Eloy's original idea to put the information into the grey message box
would require a change of [upgradesure,core_admin] string because
unfortunately it does not expect $a as an object but as a plain string.
2011-03-04 05:59:08 +01:00
David Mudrak
dc41abd808 MDL-26609 Provide a link to a docs page for more help with Moodle versions and their maturity
Thanks Martin Dougiamas for this suggestion.
2011-03-04 05:59:08 +01:00
David Mudrak
3d673fc474 MDL-26609 Admins are warned if they try to install or upgrade to unstable version
The commit introduces four new constants that can be used to declare a
maturity level of Moodle core and, in the future, of extension plugins.
If the administrator is about to install or upgrade Moodle to a version
that is not considered as production-ready yet, a warning is displayed
before any change in the database.
2011-03-04 05:59:08 +01:00
Petr Skoda
deba811a9c fixed comment typo 2010-09-05 19:19:40 +00:00
Petr Skoda
80380bd79b MDL-24089 preventing any plugin upgrades if downgraded core detected; localising error message 2010-09-05 19:16:42 +00:00
Petr Skoda
28bd3d9ad3 MDL-23824 CLI script improvements - just define('CLI_SCRIPT', true) before require config.php; all incorrect uses of cli and web scripts are detected; refactored cron script - now in two separate sctipts; fix cli inline docs and help - we have to sudo to apache account; standardised cli script locations in auth plugins 2010-08-17 12:33:30 +00:00
Petr Skoda
30f581598a new php docs style 2010-07-30 11:14:36 +00:00
Eloy Lafuente
054d3924f2 NOBUG: On upgrade, cli must not override current config. Just set undefined (new) ones 2010-01-21 10:04:03 +00:00
skodak
16ae08537b MDL-15249 support for environment test in cli scripts 2009-06-03 16:24:00 +00:00
skodak
71d549933b MDL-15249 yet more localization fixes 2009-05-31 12:38:39 +00:00
skodak
1494616faa MDL-15249 localization fixes 2009-05-31 12:04:51 +00:00
skodak
6b997b07dd MDL-15249 localized cli upgrade 2009-05-31 11:57:33 +00:00
skodak
3b596dbf0b MDL-15249 sample cli scripts - sample implementation only, no localization - ideally we should now decide what parameters we need - let the heated discussion begin ;-) 2009-05-27 09:52:25 +00:00