101 Commits

Author SHA1 Message Date
Eloy Lafuente (stronk7)
ba1f804ffa
MDL-65292 style: Fix all function declarations white space
This has been generated running the following Sniffs, all
them part of the Moodle's CodeSniffer standard:
- PSR12.Functions.ReturnTypeDeclaration
- PSR12.Functions.NullableTypeDeclaration
- moodle.Methods.MethodDeclarationSpacing
- Squiz.Whitespace.ScopeKeywordSpacing

All them are, exclusively, about correct spacing, so the changes
are, all them, only white space changes.

Only exceptions to the above are 3 changes what were setting the
return type in a new line, and, when that happens, the closing
parenthesis (bracket) has to go to the same line than the colon.
2024-02-28 23:33:26 +01:00
Meirza
e95540d9ff MDL-77341 mnet: Added missing class properties
In PHP 8.2 and later, setting a value to an undeclared class property is
deprecated and emits a deprecation notice.
So we need to add missing class properties that still need to be declared.
2023-05-20 21:37:01 +07:00
Eloy Lafuente (stronk7)
29873206b9 MDL-76055 mnet: Switch the mnet server to use the library 2022-11-02 15:56:38 +01:00
Eloy Lafuente (stronk7)
8c64ab98ee MDL-76055 mnet: Switch the mnet client to use library
Completely remove all uses if the xmlrpc php extension in
the client and replace them by the phpxmlrpc library.

Very noticeably, remove all the uses of the curl extension
and use phpxmlrpc own curl support.

Working ok for moodle-moodle/mahara sso and mahara portfolio export.
2022-11-02 15:56:38 +01:00
Sujith Haridasan
73d604369d MDL-71062 core: Step 1 deprecation of print_error function 2022-07-13 08:20:54 +05:30
Víctor Déniz
a5a3f87a76 Merge branch 'MDL-73514' of https://github.com/stronk7/moodle 2022-02-03 22:20:20 +00:00
Eloy Lafuente (stronk7)
b524f21b44 MDL-73517 mnet: add some openssl missing parameters
Since php80 the 5th parameter (cypher) in the following functions:
  - openssl_seal
  - openssl_open
is mandatory, hence:
  - adding it.
  - with value 'RC4' to keep BC.
2022-01-28 20:10:52 +01:00
Eloy Lafuente (stronk7)
fcbe439c4d MDL-73514 mnet: fix promiscuous mode and php80 support 2022-01-28 20:10:39 +01:00
Sara Arjona
a8d07a8737 MDL-69050 lang: Fix few remaining places spotted during integration 2020-10-01 13:02:48 +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
Dan Poltawski
1bd60ff6a5 MDL-52285 auth: Add constructors for backwards compat
These are very unlikely to be used but just to be safe..
2015-12-10 10:34:29 +00:00
Marina Glancy
4a89e83b80 MDL-52285 auth: use __construct() for constructors 2015-12-10 13:40:42 +08:00
Simey Lameze
4d16a2749f MDL-51162 core: replace all HTTP_RAW_POST_DATA usages
This patch replace all usages of HTTP_RAW_POST_DATA that was deprecated on PHP 5.6 by
file_get_contents('php://input'). Only the TinyMCE library has not been updated.
2015-10-20 10:27:26 +08:00
Frederic Massart
93539c44dc MDL-18183 mnet: Option to verify peer and host of MNet peer using HTTPS 2014-11-21 11:33:16 +08:00
Petr Škoda
1c74b26090 MDL-40220 use new core_component::get_plugin_directory() 2013-07-16 22:38:38 +02:00
David Mudrak
54941685e3 MDL-29148 MNet - improved handling of a verification function return code 2011-08-29 01:48:55 +02:00
David Mudrak
82c3f5d848 Do not record encrypted XML-RPC responses in error_log
Such an information is not readable anyway and it make debugging
actually harder. If somebody needs it, they can uncomment the line.
2010-11-26 09:20:28 +00:00
David Mudrak
d82d272037 NOMDL MNet: fixed incorrect usage of get_record() in permission_to_call()
When $CFG->mnet_all_hosts_id was set, the get_record() returned multiply
records and produced warnings. Also, get_record_sql() == true was just
ugly.
2010-11-09 15:38:50 +00:00
Petr Skoda
81322e6483 fixed integer casting syntax error 2010-09-17 19:42:31 +00:00
David Mudrak
53d15f925b NOMDL MNet improved debugging - do not not call get_string() for non-localized error messages 2010-07-17 22:18:20 +00:00
Penny Leach
d234faf3a4 mnet MDL-22267 updated mnet_server_faultand mnet_server_exception string handling
This is so that mnet_server_fault doesn't have to call get_string (in
case of coding exception)
2010-05-01 15:53:45 +00:00
Petr Skoda
ae58632885 MDL-22053 removing relative paths from get_plugin|component_directory() because we can be only sure that the absolute paths exists such as in case of $CFG->themedir outside of dirroot; commeting out some simpletes_ stuff which does not seem to be used any more 2010-04-10 23:21:18 +00:00
Penny Leach
71f61c41f3 mnet MDL-15505 added new mnet_debug function and started migrating to it 2010-02-05 03:56:45 +00:00
Penny Leach
48fb39411f mnet MDL-21098 small fixes - ss out issue and edge case simultaneous keyswap loop 2010-02-05 03:56:22 +00:00
Penny Leach
287efec6f6 mnet MDL-21276 get rid of all the $MNET* globals 2010-02-02 03:13:40 +00:00
Penny Leach
cd8f1cf656 mnet MDL-16858 verify the signature in the xmlrpc response 2010-02-02 02:13:25 +00:00
Penny Leach
5f27814116 mnet MDL-21473 xmlrpc client should check in the remote_ rpc tables 2010-01-29 02:59:27 +00:00
Penny Leach
8586dbe2a5 mnet MDL-21473 make new tables for remote functions that don't exist locally
I also fixed up two columns in the existing table that had underscores in them
2010-01-28 22:46:34 +00:00
Penny Leach
d2ac37c1ab mnet MDL-21261 mnet overhaul - adding and removing files I missed in the last big commit 2010-01-28 20:17:12 +00:00
Penny Leach
de260e0f7b mnet MDL-21261 large overhaul. This commit changes:
- The way that mnet rpc functions are registered.  Plugins must now
  create db/mnet.php which is an array, similar to services.php.  This
  *replaces* the old mnet_publishes() functions.  version.php must be
  bumped to trigger this.

- More information about each rpc-available function is stored in the
  database, including the class it belongs to, the file it is found in,
  and whether or not it is static.  Methods that are not static must be
  in a class with a constructor that takes no arguments (this can easily
  be achieved with a small wrapper if necessary)

- The xmlrpc dispatcher has been rewritten to remove all the
  dependencies on hardcoded information about auth,mnet,portfolio and
  repository, and just use the information in the database.

- The old hardcoded hidden mnet/testclient.php has been moved to the
  Admin menu under "Development" and rewritten.

- The xmlrpc introspection method profiling is now using php and zend
  reflection - which is a lot nicer than the old way, which was using a
  php-based php parser.  This fixes some inconsistent handling of
  methods without arguments that were advertising their return value as
  the only method parameter.  While this is a *fix*, it breaks BC
  slightly - the old 1.9 broken mnet/testclient.php will now not work
  properly with 2.0

- Dangerous mode is still supported, but old mod/*/rpclib.php is
  now unsupported, due to the fact that any plugin can export mnet
  functions with db/mnet.php.  This is a slight BC break.

Still TODO:

- TEST TEST TEST
- Document the two small BC breaks in release notes
- Document the contract for db/mnet.php
2010-01-28 05:25:50 +00:00
Penny Leach
c0b22a3f96 mnet MDL-21294 fixed some errors in the new mnet exception stuff
I think I must have tested mnet client/server around the wrong way
2010-01-13 03:46:45 +00:00
Penny Leach
939ea0bc44 mnet MDL-21294 change errors to exceptions in mnet server 2010-01-13 01:08:38 +00:00
Petr Skoda
af0e9032f9 MDL-21319 preventing debug output and cookies in mnet xmlrpc server script 2010-01-12 10:59:08 +00:00
Penny Leach
f4b58166b6 mnet MDL-17169 trim the raw xmlrpc response before passing it to the xml parser
merged from MOODLE_19_STABLE
2010-01-11 01:02:43 +00:00
Penny Leach
edf1fc350a portfolio: MDL-20892 moved portfolio/type/* plugins to portfolio/* 2009-11-18 13:27:38 +00:00
Andrew Davis
6959330979 all MDL-20821 Removed more deprecated functions 2009-11-18 06:05:10 +00:00
Petr Skoda
1d42298086 MDL-20700 coding style cleanup - cvs keywords removed, closign php tag removed, trailing whitespace cleanup 2009-11-01 12:22:45 +00:00
jerome
88d9e9d90e mnet MDL-10935 fix unicode character when the remote site send the course name for updating enrolment, merged from 19 2009-02-06 00:46:37 +00:00
mjollnir_
1cc8e4c13d Fixed misnamed variable I believe I was introduced in 1.33 2009-01-29 10:58:41 +00:00
jerome
46c8e3b0d6 MDL-15352: trivial change, add a clear error message when can't retirve listing 2008-10-24 05:36:59 +00:00
jerome
659054c521 MDL-15352: doesn't use anymore mnet system function, implemeted new mnet function, remote moodle service will appear into the peer service 2008-10-23 08:14:24 +00:00
jerome
ef378cdcf4 MDL-15352: doesn't use anymore mnet system function, implemeted new mnet function, remote moodle service will appear into the peer service 2008-10-23 08:14:23 +00:00
jerome
d3dfe9aecb MDL-15352: first version of remote moodle plugin 2008-10-22 04:04:23 +00:00
peterbulmer
c8a6dfee9b Typo correction in comment 2008-10-07 22:25:48 +00:00
peterbulmer
334e66c1c2 MDL16286 - bugfixes
Author: Peter Bulmer <peter.bulmer@catalyst.net.nz>
2008-09-28 04:19:45 +00:00
peterbulmer
8d60e9427d MDL16286 - redefine function boundaries.
Better defined what the decrypt / signature functions do & brought a lot of the error-exits together


Author: Peter Bulmer <peter.bulmer@catalyst.net.nz>
2008-09-28 04:19:04 +00:00
peterbulmer
34ebb3cfa2 MDL-16286 MDL-16285 better variable names and improved structure
Another one of those diffs that is a little more understandable when ignoring whitespace changes.


Author: Peter Bulmer <peter.bulmer@catalyst.net.nz>
2008-09-28 04:18:28 +00:00
peterbulmer
4399f32491 Created commit f319290: MDL-16285 MDL-16286 - Farm menial statements out to function
& improve variable names


Author: Peter Bulmer <peter.bulmer@catalyst.net.nz>
2008-09-28 04:17:34 +00:00
peterbulmer
469b60c52d MDL-16285 Renamed generic variable
Author: Peter Bulmer <peter.bulmer@catalyst.net.nz>
2008-09-28 04:16:59 +00:00
peterbulmer
aad3a24ced MDL-16286 MDL16285 add comment & invert logic flow
(This diff is best viewed ignoring whitespace changes)
Ignore logic flow so that errors are dealt with first


Author: Peter Bulmer <peter.bulmer@catalyst.net.nz>
2008-09-28 04:16:22 +00:00