540 Commits

Author SHA1 Message Date
Petr Škoda
0c431257e9 MDL-42387 standardise file lifetime handling 2013-11-01 10:42:18 +01:00
Marina Glancy
d90c811585 MDL-41337 files: Fixed bug with accidental delete of the root directory 2013-10-29 20:29:35 +11:00
Dan Poltawski
d0041fb110 Merge branch 'w43_MDL-38743_m26_private' of https://github.com/skodak/moodle 2013-10-23 13:15:48 +08:00
Petr Škoda
29c43343a2 MDL-38743 add private cache headers 2013-10-18 15:54:43 +02:00
Petr Škoda
9cc5f32b22 MDL-42386 fix invalid etag comparison
Credit goes to Eloy Lafuente, thanks!
2013-10-18 14:48:40 +02:00
Dan Poltawski
07b0214588 Merge branch 'm26_MDL-40226_Add_JNLP_MIME_Type_Support' of https://github.com/scara/moodle
Conflicts:
	lib/db/upgrade.php
	version.php
2013-10-09 16:46:56 +08:00
Sam Hemelryk
f18f96f767 Merge branch 'wip-MDL-42016-master' of git://github.com/marinaglancy/moodle
Conflicts:
	lib/db/install.xml
	lib/db/upgrade.php
	version.php
2013-10-09 15:58:45 +13:00
Matteo Scaramuccia
fd43a49b72 MDL-40226 Files: Added the correct MIME Type for JNLP files.
JNLP stands for Java Network Launch Protocol, used to launch
Java Web Start applications. More details in:
http://docs.oracle.com/javase/tutorial/deployment/webstart/deploying.html
2013-10-06 16:22:34 +02:00
Marina Glancy
2a68ee0eb1 MDL-42016 files: Properly synchronise internal references 2013-10-06 18:05:05 +11:00
Petr Škoda
38fc013025 MDL-42040 refactor core Moodle shutdown handlers logic 2013-10-04 11:36:46 +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
Sam Hemelryk
da8cd86f17 Merge branch 'MDL-38194-master' of git://github.com/sammarshallou/moodle
Conflicts:
	lib/upgrade.txt
2013-09-16 13:56:05 +12:00
Sam Hemelryk
cf13da65e1 Merge branch 'MDL-36316-master' of git://github.com/danpoltawski/moodle 2013-09-16 13:13:41 +12:00
sam marshall
137885b7e9 MDL-38194 Files: Allow download of large backup files
The PHP readfile function does not work for files more than 2GB.
This commit provides a wrapper that can be used so that files less
than 2GB are sent with readfile, and files larger than 2GB are
sent manually.

The change applies to all uses of pluginfile.php, although in
reality, backup files are probably the only ones likely to be more
than two gigabytes.
2013-09-13 14:59:57 +01:00
Dan Poltawski
378b3eac83 MDL-36316 useragent: Reduce user agent sniffing
* core_useragent: Introduce is_vendor methods to improve readability
  when we are just detecting if a browser is from a vendor, rather than
  the exact version

* Remove uncessary browser version checks when we are just detecting
  vendors - this makes the intention of our sniffing clearer.

* Remove sniffing for browsers which we do not support, grades/ajax/tinymce
  all support modern browsers so there is no need to sniff for them.
2013-09-13 14:25:37 +08:00
Petr Škoda
4db9d48253 MDL-28094 add function that detects if subdirs used and fix subdirs option in form editor 2013-09-07 11:30:18 +02:00
Sam Hemelryk
c3d2fbf9cd MDL-40931 useragent: separated user agent functionality into a lib
This commit moves user agent related functionality out of several
core libraries and combines it into a more manageable class.
All core uses are converted and functions deprecated in favor
of the new class.
2013-08-26 13:59:19 +12:00
Damyon Wiese
9ead041cdb Revert "MDL-40931 useragent: separated user agent functionality into a lib"
This reverts commit af62237d0e6e27df868d50848f7098f57c103f86.
This reverts commit 87a4194fdcd322d4aee5a6207b55a8da0864da94.
This reverts commit b2c66eb60c01805f26cc791966f05be52af7b406.

Conflicts:

	version.php
2013-08-22 13:31:25 +08:00
Sam Hemelryk
af62237d0e MDL-40931 useragent: separated user agent functionality into a lib
This commit moves user agent related functionality out of several
core libraries and combines it into a more manageable class.
All core uses are converted and functions deprecated in favor
of the new class.
2013-08-16 09:02:01 +12:00
Petr Škoda
eb459f7192 MDL-40642 set more restrictive umask and use proper permission for new dirs and files 2013-07-19 09:18:44 +02:00
Petr Škoda
b0d1d941c9 MDL-40220 use new core_component::get_component_directory() 2013-07-16 22:42:37 +02:00
Matteo Scaramuccia
78030f9db1 MDL-39832 Files: Fixed ETag format according with RFC2616.
ETag must be double quoted,
http://tools.ietf.org/html/rfc2616#section-3.11:

      entity-tag = [ weak ] opaque-tag
      weak       = "W/"
      opaque-tag = quoted-string
2013-07-07 09:02:17 +02:00
Matteo Scaramuccia
264631cdc8 MDL-39832 Files: Revert MDL-39688 commit, f111746140fe80a821ae69e3bf518d950bf188a1
MDL-39688 has been successful in providing a solution for the issue but further
investigations done in MDL-39832 have got the evidence that the given solution
is more likely a workaround.
2013-07-07 09:02:15 +02:00
Eloy Lafuente (stronk7)
2e746b72be MDL-39733 xhprof: implement import of runs 2013-07-02 00:28:47 +02:00
Sam Chaffee
41340f0461 MDL-40258: Fixed invalid json string error in file-picker 2013-06-21 11:16:44 -04:00
Petr Škoda
220eef0e4c MDL-33955 make downalod_file_content() use curl class and cleanup
The options in constructor were renamed to setttings in order to prevent confusion.
This removes ignored CURLOPT_BINARYTRANSFER, add newline header cleaning,
reworks proxy settings and some other minor issues.
2013-06-14 08:03:49 +02:00
Petr Škoda
9936c2a54c MDL-33955 fix sloppy whitespace in curl class 2013-06-14 08:03:49 +02:00
Dan Poltawski
a151eb403e Revert "MDL-39832 Files: Revert MDL-39688 commit, f111746140fe80a821ae69e3bf518d950bf188a1"
This reverts commit 3960c00e3cf129c60b01fecdfe2851ba9ef7ba59.
2013-06-13 13:56:11 +08:00
Dan Poltawski
db74804ff1 Revert "MDL-39832 Files: Fixed ETag format according with RFC2616."
This reverts commit 9ab37ae3e07f54bc08644f8462d94bed68ff6c9b.
2013-06-13 13:56:09 +08:00
Matteo Scaramuccia
9ab37ae3e0 MDL-39832 Files: Fixed ETag format according with RFC2616.
ETag must be double quoted,
http://tools.ietf.org/html/rfc2616#section-3.11:

      entity-tag = [ weak ] opaque-tag
      weak       = "W/"
      opaque-tag = quoted-string
2013-06-06 23:14:44 +02:00
Matteo Scaramuccia
3960c00e3c MDL-39832 Files: Revert MDL-39688 commit, f111746140fe80a821ae69e3bf518d950bf188a1
MDL-39688 has been successful in providing a solution for the issue but further
investigations done in MDL-39832 have got the evidence that the given solution
is more likely a workaround.
2013-06-06 23:14:42 +02:00
Petr Škoda
f111746140 MDL-39688 do not set Etag when sending http ranges 2013-05-25 09:10:24 +02:00
Marina Glancy
6dd92c0234 MDL-39177 Updating userid when file is overwritten 2013-05-20 14:09:11 +10:00
Marina Glancy
935429af8b MDL-39177 More comments about confusing files.source field 2013-05-17 13:43:45 +10:00
Marina Glancy
32495c06b5 MDL-39177 Perform all checks on draftfile area before saving the files 2013-05-17 13:43:45 +10:00
Marina Glancy
489bd32b29 MDL-39177 Remove code duplication 2013-05-17 13:43:45 +10:00
Marina Glancy
0e7fd52e20 MDL-39177 Update file in filearea only if original is present
Now when file was deleted in filemanager and new file with the same file was uploaded the references will be converted to copies exactly like UI warns in filemanager.
Also do not delete original information from draftfiles.
2013-05-17 13:43:45 +10:00
Marina Glancy
e9e32b1d88 MDL-39177 File reference is not updated when overwriting the file 2013-05-17 13:43:44 +10:00
Petr Škoda
c2140b5d95 MDL-39356 add ca certificate bundles for cURL
This is necessary because PHP in Windows does not have any certificates and some *nix systems have outdated or missing ca bundles too.

The order is:
1/ dataroot/moodleorgca.crt always wins - needs to be added manually by admin
2/ php.ini setting "curl.cainfo" is next
3/ on Windows libdir/cacert.pem is used because it does not have any default cert bundles
4/ system default is the last - the previous value, ok for properly configured *nix systems
2013-04-28 20:58:58 +02:00
Petr Škoda
ecff46cddc MDL-38798 remove unused property which was giving notices in PHP 5.5beta 2013-04-07 11:41:19 +02:00
Aparup Banerjee
37240ce5c6 Merge branch 'wip-MDL-38708-master' of git://github.com/marinaglancy/moodle
Conflicts:
	version.php
2013-04-04 15:07:01 +08:00
Yuliya Bozhko
278065528a MDL-35073 badges: Open badges integration
The badges feature allows to integrate Mozilla "Open Badges" to issue, assign,
manage and display digital badges in Moodle. This feature supports:
-- badge creation and issuing based on criteria
-- badge baking and verification service
-- direct pushing of internal badges to external backpack
-- interanl and external badge display in Moodle
-- Moodle block to display latest badges
2013-04-02 15:49:02 +08:00
Marina Glancy
d1f8c1bd62 MDL-38708 Added course overview files (most often images) to courses 2013-04-02 11:08:21 +11:00
Damyon Wiese
41fdbc0d77 MDL-38468 Filelib: Fix ordering of new mimetypes 2013-03-26 15:16:15 +08:00
Matteo Scaramuccia
2aecb84d01 MDL-38468 Files API: fixed the support for MTHML (MIME HTML: web page archive) files 2013-03-23 10:21:51 +01:00
Eloy Lafuente (stronk7)
2a28b5d4ad Merge branch 'MDL-38268-master' of https://github.com/jfilip/moodle 2013-03-13 01:14:03 +01:00
Justin Filip
2e667c7405 MDL-38268 files: Must be explicit about switching cURL request method from HEAD to GET. 2013-03-05 11:30:22 -05:00
Eloy Lafuente (stronk7)
d5834b3712 Merge branch 'MDL-38170-master' of git://github.com/sammarshallou/moodle 2013-03-04 16:25:00 +01:00
sam marshall
85cb4b65b1 MDL-38170 SimplePie: Cannot read https feeds through proxy 2013-03-01 10:36:51 +00:00
sam marshall
bedd74bc22 MDL-38168 Filelib: Curl class does not honour proxybypass option 2013-02-22 14:15:01 +00:00