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 841 times via Git panel.

commit 70dc934a9f3221acba244824384acfb4e2ba8e35
tree c1ff9dc4747662edd792c8530558bcd97cc432ba
parent 796d3da732db5b9e57cc49d34040361a0f35acad
author Psylocke Antonio <psylocke@majcms.org> 1321880695 +0800
committer Psylocke Antonio <psylocke@majcms.org> 1321880695 +0800

    Fix blank page in album image delete

diff --git a/album.php b/album.php
index e32729d..bb622d5 100644
--- a/album.php
+++ b/album.php
@@ -29,8 +29,16 @@ if (isset($maj_logged_in_username) and ($maj_logged_in_username == $maj_admin_us
        if (count(glob("images/$maj_req_entry/album/*")) < 1) {
                header("Location: index.php?entry=$maj_req_entry");
        }
-      
-       header("Location: album.php?entry=$maj_req_entry&show={$_REQUEST['next']}");
+       else {
+               if (!empty($_REQUEST['next'])) {
+                       header("Location: album.php?entry=$maj_req_entry&show={$_REQUEST['next']}");
+               }
+               else {
+                       if (!empty($_REQUEST['prev'])) {
+                               header("Location: album.php?entry=$maj_req_entry&show={$_REQUEST['prev']}");
+                       }
+               }              
+       }
 }
 
 if (isset($_POST['filename']) and !empty($_POST['filename']) and isset($maj_logged_in_username) and ($maj_logged_in_username == $maj_admin_username) and isset($_POST['edit']) and ($_POST['edit'] == "rename") and !file_exists("images/$maj_req_entry/album/{$_POST['filename']}")) {
@@ -205,6 +213,7 @@ if (file_exists("images/$maj_req_entry/album/$maj_req_show")) {
                echo "<form enctype=\"multipart\/form-data\" action=\"{$_SERVER['PHP_SELF']}\" method=\"post\">";
                echo "<input type=hidden name=entry value=$maj_req_entry>";
                echo "<input type=hidden name=show value=$maj_req_show>";
+               echo "<input type=hidden name=prev value=$show_prev>";
                echo "<input type=hidden name=next value=$show_next>";
                echo "<input type=hidden name=edit value=delete>";             
                echo "<tr bgcolor=#ffffff><td colspan=\"$album_image_colspan\"><input type=submit class=click value=\"click here to delete image\"></td></tr>";
 
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
33087 downloads
MAJ 1.0
26 files
13170 downloads
MAJ 0.14
45 files
35071 downloads