Commit Graph

21244 Commits

Author SHA1 Message Date
Russell Smith ffd94de398 MDL-55272 lib: Allow random_bytes() to return large values.
PHP has a recursion limit and random_bytes on PHP5.6 without openssl
will error if sent a large value.  Using a loop has lower overhead than
recursion as well.
2016-08-16 12:16:45 +10:00
Andrew Nicols 95cc9d3b53 Merge branch 'wip-mdl-55329-m30' of https://github.com/rajeshtaneja/moodle into MOODLE_30_STABLE 2016-08-09 14:28:19 +08:00
Mark Nielsen 339ca4ca04 MDL-55453 core_lib: Fix usage of js_send_uncached 2016-08-08 09:54:22 +01:00
Russell Smith 42a4a52a4c MDL-55292 performance: Allow Tideways profiler extension.
PHP7 doesn't have any default XHProf support and all other
investigated forks don't have stable PHP7.  Tideways is under
active development and is easy to install.  The data format
is compatible with XHProf so it is a drop-in replacement in that way.
2016-08-08 15:26:42 +08:00
Rajesh Taneja 0944b1641a MDL-54656 behat: Skip test if db family is not mysql or postgres 2016-08-04 08:47:42 +08:00
Dan Poltawski a896f02f1f MDL-54847 tests: fix unused var 2016-08-02 20:16:45 +01:00
Cameron Ball 4f9a64b6ff MDL-54847 weblib: Test media attributes individually 2016-08-02 20:16:41 +01:00
Dan Poltawski 10ba40f1c3 Merge branch 'wip-MDL-33741-m30' of git://github.com/marinaglancy/moodle into MOODLE_30_STABLE 2016-08-02 12:20:33 +01:00
Cameron Ball d2d65178fa MDL-54847 weblib: Support basic HTML media tags 2016-08-02 15:55:39 +08:00
Marina Glancy 4fdeed4bec MDL-33741 file_info: show courses in hidden categories
This also has a couple of bugfixes:
- file_info_context_system::get_children() was looking for courses with parent=0, it is impossible, block removed;
- file_info_context_coursecat::get_area_coursecat_description() was checking the wrong capability to view files in description
2016-08-01 09:15:22 +08:00
Marina Glancy d9bea44f18 MDL-33741 file_info: check capability when serving file in coursecat description 2016-08-01 09:15:15 +08:00
Rajesh Taneja 7c74b0aeb8 MDL-55329 behat: PyStrings should end with : (colon) 2016-07-27 07:02:34 +08:00
David Monllao 568fea46d2 Merge branch 'wip-MDL-55183-30' of git://github.com/abgreeve/moodle into MOODLE_30_STABLE 2016-07-26 09:57:07 +08:00
David Monllao 44d7062228 Merge branch 'MDL-55283-30' of git://github.com/andrewnicols/moodle into MOODLE_30_STABLE 2016-07-26 05:05:07 +08:00
Adrian Greeve c310304149 MDL-55183 editor_atto: Fix requires error.
When using a different theme and removing an editor
plugin such as the equation plugin, atto will display
an error about a missing dependency.

A thank you to Anthony Forth for providing this patch.
2016-07-25 09:17:53 +08:00
Andrew Nicols 4fdf0b226c MDL-55283 javascript: Check dir is readable before traversing them 2016-07-20 12:17:08 +08:00
Dan Poltawski baaf2e67e1 Merge branch 'MDL-54915-30' of http://github.com/damyon/moodle into MOODLE_30_STABLE 2016-07-19 09:39:09 +01:00
Dan Poltawski 19421799cb Revert "Merge branch 'MDL-54915-30' of git://github.com/andrewnicols/moodle into MOODLE_30_STABLE"
This reverts commit 4b6e0cbd57, reversing
changes made to 8d6dde0805.
2016-07-19 09:37:36 +01:00
Damyon Wiese 28436ac123 MDL-54915 templates: Fix async rendering of js blocks
Mustache JS helper can overwrite JS blocks when using nested templates.

Each call to render should have it's own scope.

Conflicts:
	lib/amd/build/templates.min.js
	lib/amd/src/templates.js
2016-07-19 13:19:48 +08:00
Frederic Massart d2b890c689 MDL-4915 templates: Improve JS string handling in templates
Backported from MDL-53667 to make cherry-picking easier across branches.

The native String.replace method in extremely slow when we are
dealing with a large string and large quantity of strings to replace.
This new solution walks through the string looking for placeholders
to replace.
2016-07-19 13:15:38 +08:00
Eloy Lafuente (stronk7) 3724d55c21 MDL-52544 oracle: small tweaks
This commit just:

- Moves the null => '' to better place, restricting it to PHP >= 7.0
  (bug https://bugs.php.net/bug.php?id=72524)
- Adds a couple of notes here and there.
- Changes some small details to keep the file using the same coding.
2016-07-19 04:04:57 +02:00
Eloy Lafuente (stronk7) 353c12c32f Merge branch 'MDL-52544-30' of git://github.com/damyon/moodle into MOODLE_30_STABLE 2016-07-19 04:04:51 +02:00
Dan Poltawski 87c1a2e7e8 Merge branch 'wip-mdl-55174-m30' of https://github.com/rajeshtaneja/moodle into MOODLE_30_STABLE 2016-07-18 14:49:54 +01:00
Dan Poltawski 5a00afe7ab Merge branch 'MDL-55012-30' of git://github.com/damyon/moodle into MOODLE_30_STABLE 2016-07-18 13:55:23 +01:00
Dan Poltawski 4b6e0cbd57 Merge branch 'MDL-54915-30' of git://github.com/andrewnicols/moodle into MOODLE_30_STABLE 2016-07-18 09:17:55 +01:00
Rajesh Taneja b5b18eb572 MDL-55174 core_testing: Use proper directory separator
While searching for existing files if directory
separator is not correct then original files
and directories will be deleted. So use DIRECTORY_SEPARATOR.
2016-07-15 13:54:22 +08:00
Damyon Wiese c345d23084 MDL-55012 Atto: no style attrs on paste
Specifically on paste - we don't need all the random style attributes
from content on the clipboard. When you copy from a webpage - the browser
inlines all the styles from the page so that the pasted content will look
like the place it was copied from. But this is never what you want - you
want the content on paste, but with no special styling.
2016-07-15 13:41:45 +08:00
Damyon Wiese 373d1eb7d0 MDL-52544 oracle: Apply upstream pull request to AdoDB oracle driver
Upstream: https://github.com/ADOdb/ADOdb/pull/259

Prevent segfault with ocipo driver on php7.

The OCIFetchinto function is causing segfaults on php7 - probably because the fields array
is not initialised or it is optimised out. This fixes just changes to use the safer function
oci_fetch_array instead.
2016-07-13 08:46:40 +08:00
Eloy Lafuente (stronk7) acc2203622 Merge branch 'MDL-54892-MOODLE_30_STABLE' of https://github.com/tobiasreischmann/moodle into MOODLE_30_STABLE 2016-07-12 17:51:56 +02:00
David Monllao eee0dce093 Merge branch 'MDL-55133-30' of git://github.com/damyon/moodle into MOODLE_30_STABLE 2016-07-12 13:16:48 +02:00
Dan Poltawski 68adc36911 Merge branch 'MDL-47371-30' of git://github.com/cameron1729/moodle into MOODLE_30_STABLE 2016-07-12 10:14:30 +01:00
Dan Poltawski 8994550de2 Merge branch 'MDL-55007-m30' of https://github.com/dthies/moodle into MOODLE_30_STABLE 2016-07-12 09:21:08 +01:00
Cameron Ball 469a0854e3 MDL-47371 block_navigation: Don't double escape course titles 2016-07-12 10:34:43 +08:00
Cameron Ball ce4ff71aa3 MDL-47371 weblib: Add option to disable escaping 2016-07-12 10:34:42 +08:00
Andrew Nicols f811e12a60 MDL-54915 core: JS Blocks must not used shared variables
The JS blocks in a template must _not_ use a shared variable as they can be
executed asynchronously and complete in any order.

Instead it is stored in the only local variable available - the current
context.

Since the context can be passed in from elsewhere, we namespace it to
reduce the chance of collission.
2016-07-12 10:01:52 +08:00
Dan Poltawski cdf2cf7f39 Merge branch 'MDL-55137-30' of git://github.com/cameron1729/moodle into MOODLE_30_STABLE 2016-07-11 14:37:59 +01:00
Daniel Thies da0e1acfed MDL-55007 filter_mathjaxloader: Change unit test 2016-07-07 20:26:18 -05:00
Damyon Wiese 4aec01cc4c MDL-52544 oracle: php7 fixes for oci driver
These are our bugs actually - the oci docs are very clear that bound
params should be in-scope when oci_execute is called - and due to pass by value etc,
this was not true for our driver.

There is another bug that needed fixing - OCI barfs if null values are bound - this
can be avoided by setting them to '' which oci treats as null.

And finally - all our lob/clob/blob hacks were also binding to local "out-of-scope" vars.
2016-07-07 13:10:03 +08:00
Andrew Nicols 119412b0ca Merge branch 'MDL-54734-30' of git://github.com/lameze/moodle into MOODLE_30_STABLE 2016-07-07 09:58:32 +08:00
Simey Lameze 1e8bbc6040 MDL-54734 core_user: do not cache dummy user records 2016-07-07 09:32:47 +08:00
Andrew Nicols 2245bc111b MDL-54734 user: Add tests to demonstrate multi-user issues 2016-07-07 09:31:58 +08:00
Cameron Ball 574afbc75f MDL-55137: Update PHPDoc for external_format_text 2016-07-06 17:48:41 +08:00
Damyon Wiese 443feb7ee8 MDL-55133 javascript: Correctly use component names in requirejs
Core subsystems must use the 'core_' prefix always.
2016-07-06 10:29:35 +08:00
Eloy Lafuente (stronk7) ea9061b213 Merge branch 'MDL-29738-30' of git://github.com/andrewnicols/moodle into MOODLE_30_STABLE 2016-07-05 17:07:31 +02:00
Andrew Nicols 96b36b930a MDL-29738 file: Remove unused stylesheet functionality
This functionality was commented out in
78946b9bdb for MDL-20204 back in 2009.
Since then it has been wasting cycles performing utterly pointless
preg_match and preg_replace calls.
2016-07-05 19:29:57 +08:00
Dan Poltawski ed577ebd43 Merge branch 'MDL-54994_30' of git://github.com/stronk7/moodle into MOODLE_30_STABLE 2016-07-04 14:18:21 +01:00
Dan Poltawski d4a279464e Merge branch 'MDL-55041_30_STABLE' of https://github.com/marxjohnson/moodle into MOODLE_30_STABLE 2016-07-04 12:45:58 +01:00
Marina Glancy 84cd5dca45 MDL-55069 core: escape special characters in email headers 2016-07-04 12:28:06 +01:00
Andrew Nicols e11ad0fc71 Merge branch 'MDL-55020-30-pluginzip' of git://github.com/mudrd8mz/moodle into MOODLE_30_STABLE 2016-07-04 11:26:53 +08:00
Mark Johnson 74526688a0 MDL-55041 roles: Fix JSON parsing in permission manager 2016-07-01 15:00:36 +01:00