Profile
MAJ is an Open Source, PHP-based content management system (CMS) that can be deployed as a blog, bulletin or message board, Internet forum, and wiki. It is extensible via PHP panels and is HTML5 and CSS3 ready.
Git
This commit has been accessed 2468 times via Git panel.

commit cde652ed93d7b16e00c65642bc83a7243fd0c9f1
tree 7e28eed07e22e2eaac8de61ada8cdeecbe1c7c49
parent 35ba66b74bba3f0328e415893cde1fa57752288c
author Magie Antonio <magie@majcms.org> 1371895777 +0800
committer Magie Antonio <magie@majcms.org> 1371895777 +0800

    Fix incorrect imagegif and imagepng quality

diff --git a/core.php b/core.php
index dc65757..dd65b9b 100644
--- a/core.php
+++ b/core.php
@@ -438,7 +438,7 @@ function maj_avatar_image($author_username,$max_img_width=80,$show_username=1,$s
 
                                        unlink("$maj_image_directory/avatar.gif");
 
-                                       imagegif($avatar_gif_image_resize,"$maj_image_directory/avatar.gif",100);
+                                       imagegif($avatar_gif_image_resize,"$maj_image_directory/avatar.gif");
 
                                        imagedestroy($avatar_gif_image_resize);
                                        imagedestroy($avatar_gif_image_original);
@@ -502,7 +502,7 @@ function maj_avatar_image($author_username,$max_img_width=80,$show_username=1,$s
 
                                        unlink("$maj_image_directory/avatar.png");
 
-                                       imagepng($avatar_png_image_resize,"$maj_image_directory/avatar.png",100);
+                                       imagepng($avatar_png_image_resize,"$maj_image_directory/avatar.png",9);
 
                                        imagedestroy($avatar_png_image_resize);
                                        imagedestroy($avatar_png_image_original);
@@ -548,7 +548,7 @@ function maj_avatar_image($author_username,$max_img_width=80,$show_username=1,$s
 
                                        unlink("$maj_image_directory/members/$author_username/avatar.gif");
 
-                                       imagegif($avatar_gif_image_resize,"$maj_image_directory/members/$author_username/avatar.gif",100);
+                                       imagegif($avatar_gif_image_resize,"$maj_image_directory/members/$author_username/avatar.gif");
 
                                        imagedestroy($avatar_gif_image_resize);
                                        imagedestroy($avatar_gif_image_original);
@@ -611,7 +611,7 @@ function maj_avatar_image($author_username,$max_img_width=80,$show_username=1,$s
 
                                        unlink("$maj_image_directory/members/$author_username/avatar.png");
 
-                                       imagepng($avatar_png_image_resize,"$maj_image_directory/members/$author_username/avatar.png",100);
+                                       imagepng($avatar_png_image_resize,"$maj_image_directory/members/$author_username/avatar.png",9);
 
                                        imagedestroy($avatar_png_image_resize);
                                        imagedestroy($avatar_png_image_original);
 
Credits
Sunday, Sep 18, 2005, 12:00 AM (Revision 11 - Thursday, Jul 14, 2011, 7:30 PM)
Open Source enables software developers to stand on the shoulders of giants instead of reinventing the wheel, so to speak. Kudos and many thanks to the folks who made their work freely available for reuse in MAJ.

read more
Bugs and Exploits
Friday, Aug 26, 2005, 12:00 AM (Revision 23 - Wednesday, May 29, 2013, 5:25 AM)
Although MAJ started as a family project, care has been taken to make it as "safe" as possible. With more people now working on MAJ, bugs and exploitable code may sometimes slip in. We invite you to poke around and see if you can find any. Generally, there are two things you can do when you find a MAJ or PHP-related bug or exploit:

1. Take advantage of it. But hey, what's so exciting about messing up someone's blog? Ho-hum, right?
2. Report it here so that we can work on a fix and make MAJ better.

read more
Search
Download
MAJ 2.0
75 files
32054 downloads
MAJ 1.0
26 files
12901 downloads
MAJ 0.14
45 files
34473 downloads