44 Commits

Author SHA1 Message Date
Andrew Nicols
613f933442
Merge branch 'MDL-80820' of https://github.com/marinaglancy/moodle 2024-04-15 10:42:22 +08:00
Marina Glancy
ef1759da74 MDL-80820 various: fix incorrect phpdocs 2024-04-08 10:13:10 +01:00
Marina Glancy
33c528aaec MDL-81256 lib: fix rounding of thumbnail image size 2024-04-08 10:01:04 +01:00
Marina Glancy
8fc1486d36 MDL-77164 various: fix incorrect phpdocs 2023-04-13 11:35:06 +01:00
Marina Glancy
b1c97381b4 MDL-76356 various: avoid implicit conversion to int
PHP before version 8.1 automatically converted to int if the function
parameter (or array key) is expected to be int. PHP 8.1 shows notice in
this case
2023-01-10 15:27:11 +01:00
Marina Glancy
593540cc19 MDL-70968 core: PHP8 compatibility, not allowed to pass extra parameters 2021-02-28 19:43:37 +01:00
Frederic Massart
92b9ef9917
MDL-55445 gdlib: Support for resizing an image 2016-08-15 10:54:28 +08:00
Frederic Massart
cda2a8273a MDL-50041 gdlib: Badges need PNG files from process_new_icon() 2015-04-29 18:50:20 +08:00
Andrew Nicols
b7067f065e MDL-49627 core: Improve thumbnail generation
We now abstract the actual file generation to a new function.
We are then able to call this function from the other image generation
sources. This allows us to generate thumbnails in a more efficient manner.

* Stored files stay as stored files and are not temporarily re-written to
  disk;
* Strings containing an image remain as a variable and are not temporarily
  written to disk; and
* Arbitrary files are not captured to string.
2015-04-01 11:05:19 +08:00
gthomas2
78c36b065f MDL-46763 core: Change icon processing to retain source format 2015-02-10 23:55:57 +01:00
Petr Škoda
689096bc26 MDL-38654 do not test $CFG->gdversion
GD PHP extension is now required. Add-ons need to remove $CFG->gdversion tests. The worst case regression is that add-on will think GD is not available.
2013-03-22 16:57:55 +01:00
Petr Skoda
8b5d2864ab MDL-32972 keep gif transparency when processing user avatar images 2012-05-19 18:47:23 +02:00
Petr Skoda
33d9f44bc6 MDL-18763 add 512x512px user avatar support 2012-05-19 18:47:23 +02:00
Petr Skoda
4d254790c4 MDL-32628 add revision for user avatar images
This should finally resolve all avatar caching issues and should also help with performance.
2012-04-30 23:36:47 +02:00
David Mudrak
f0a23f5322 MDL-32471 introducing generate_image_thumbnail() function
This helper function uses GD library to generate a thumbnail of the
given image file.
2012-04-24 12:09:45 +02:00
David Mudrak
f0f4fff900 MDL-32471 fixing the coding style in lib/gdlib.php
The GD functions are listed in lowercase in the PHP manual. So they
should be using this case in our code, too (otherwise, doc autolinking
tools may not work). I did not remove the underscore from the parameters
names intentionally to have the function interface compatible with the
one documented in the PHP manual.

See http://www.php.net/manual/en/ref.image.php
<
2012-04-24 12:09:44 +02:00
Petr Skoda
365a594107 MDL-24321 switching to stdClass in /lib/ 2010-09-21 08:07:44 +00:00
Petr Skoda
0b03619469 initialize objects 2010-09-18 11:32:56 +00:00
Petr Skoda
2cc895aab7 MDL-11000 finally switching to png images with jpg fallback, based on code by Luigi Pinca :-) 2010-07-25 16:28:09 +00:00
Petr Skoda
78bfb562a0 MDL-21249 improved php docs and adding direct access prevention in core libs 2010-07-25 13:35:05 +00:00
Petr Skoda
d08787af90 MDL-23202 gdlib api cleanup 2010-07-11 13:12:53 +00:00
Petr Skoda
edfd6a5e73 MDL-14589 user icons now stored in file storage pool 2010-07-11 11:43:15 +00:00
Petr Skoda
6f5e085205 MDL-20700 coding style cleanup - cvs keywords removed, closign php tag removed, trailing whitespace cleanup 2009-11-01 16:48:45 +00:00
Petr Skoda
117bd74897 MDL-20700 coding style cleanup - cvs keywords removed, closign php tag removed, trailing whitespace cleanup 2009-11-01 11:31:16 +00:00
nicolasconnault
aa9a686740 MDL-19799 Upgraded calls to helpbutton, print_simple_box* and notify 2009-08-18 05:20:12 +00:00
samhemelryk
ba21c9d440 lib MDL-19236 added phpdocs and copyrights 2009-05-25 08:27:25 +00:00
skodak
172dd12c63 MDL-14589 initial file storage implementation, temporary file manager, migration of course files; blog conversion MDL-15905; assignment conversion MDL-15904; fromslib related file improvements MDL-15906 2008-07-31 22:15:30 +00:00
moodler
b352b2e9c2 MDL-11752 Upload users form merged from 1.9 2008-02-21 05:24:18 +00:00
nicolasconnault
ddaadc7c78 MDL-8605 More changes to upgrade and restore, and some unit tests with db and rs mock objects 2007-10-12 19:13:18 +00:00
nicolasconnault
56a1a88228 MDL-8605 New user directories implemented 2007-10-11 09:01:29 +00:00
skodak
dd24722b47 MDL-10862 add delete_profile_image() function + whitespace + removed redundant function calls + docs 2007-08-15 14:00:35 +00:00
stronk7
feba81cc49 Avoid one notice. Bug 4690. Credits go to fad. B-)
(http://moodle.org/bugs/bug.php?op=show&bugid=4690)
2006-02-11 16:17:06 +00:00
moodler
fe9f19ef1e Added a fix to help user profile pictures under safe mode (from Mahmoud H. Hasan)
PHP manual mentions it too.
2006-01-28 14:15:56 +00:00
moodler
ad5d16e04b Added some checking of GD functionality before using functions, see bug 4040 2005-09-12 07:57:16 +00:00
bawjaws
8b5e8ea943 rolling back my filename changing code to follow Martin's suggestion for
a more elegant solution to the black border. Towards that end added a
routine to zoom in on image, cropping the border (if resampling available)
 or interpolate from neighbouring pixels otherwise.
2005-07-22 14:08:05 +00:00
bawjaws
4e95baef3c placing uploaded images in different directory from previously uploaded
images to differentiate between bordered and borderless images
2005-07-06 16:17:18 +00:00
moodler
34ea06ece4 Undoing hack from David ... it can't be just switched off
without making existing sites look crap
2005-07-06 13:24:43 +00:00
bawjaws
b2e0000ddb removing code that draws a 1 pixel wide black line around user uploaded
images so that it can be replaced with equivalent CSS
2005-06-27 12:22:14 +00:00
dhawes
99c2531671 Converted comments to phpdoc style. Functions require additional documenting. 2004-09-26 04:57:07 +00:00
mjollnir_
81d425b43c Integration of new centralised upload code with user profile, and group profile, as well as an enhancement to upload class to be configured to be silent.
These patches are maintained in an publicly accessible Arch repository, see: http://lists.eduforge.org/cgi-bin/archzoom.cgi/arch-eduforge@catalyst.net.nz--2004-MIRROR/moodle--eduforge--1.3.3

Index of arch patches in this commit:

arch-eduforge@catalyst.net.nz--2004/moodle--eduforge--1.3.3--patch-66
    2004-09-16 00:03:41 GMT
    Penny Leach <penny@catalyst.net.nz>
    changes to upload class to be silent if we want it to be, integration with editing user profile and group profile (which meant changes in lib/gdlib.php as well as course/group-edit and group.php and user/edit.html and edit.php


Full logs:

Revision: moodle--eduforge--1.3.3--patch-66
Archive: arch-eduforge@catalyst.net.nz--2004
Creator: Penny Leach <penny@catalyst.net.nz>
Date: Thu Sep 16 12:03:41 NZST 2004
Standard-date: 2004-09-16 00:03:41 GMT
Modified-files: course/group-edit.html course/group.php
    lib/gdlib.php lib/uploadlib.php user/edit.html
    user/edit.php
New-patches: arch-eduforge@catalyst.net.nz--2004/moodle--eduforge--1.3.3--patch-66
Summary: changes to upload class to be silent if we want it to be, integration with editing user profile and group profile (which meant changes in lib/gdlib.php as well as course/group-edit and group.php and user/edit.html and edit.php
Keywords:
2004-09-16 00:16:48 +00:00
gustav_delius
dcb1bd3c9a towards XHTML compliance 2004-09-12 13:21:01 +00:00
moodler
7721c69499 save_user_image ---> save_profile_image so it works for groups too 2004-02-10 14:24:36 +00:00
moodler
ef6b0c645e Ignore errors on chown 2004-01-20 08:46:23 +00:00
moodler
158d5a4f32 New library for collecting routines related to GD 2004-01-10 16:38:18 +00:00