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

commit bdfbfda438421cd407a8c38eb1992df95261e557
tree 38636def519d6ff715b4674b6ee8af20c2fd72a7
parent daf4deead9936f5bac8137aa99d5b3260a68c66a
author Engels Antonio <engels@majcms.org> 1277314210 +0800
committer Engels Antonio <engels@majcms.org> 1277314210 +0800

    maj-1.0-20090205-bb.zip

diff --git a/album.php b/album.php
index 08231cc..c1a3312 100644
--- a/album.php
+++ b/album.php
@@ -54,6 +54,10 @@ if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username
        if (file_exists("data/items/{$_REQUEST['entry']}/album/views/{$_REQUEST['show']}.txt")) {
                unlink("data/items/{$_REQUEST['entry']}/album/views/{$_REQUEST['show']}.txt");
        }
+
+       if (count(glob("images/{$_REQUEST['entry']}/album/*")) < 1) {
+               header("Location: index.php?entry={$_REQUEST['entry']}");
+       }
 }
 
 if (isset($_POST['filename']) and !empty($_POST['filename']) and isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username) and isset($_POST['edit']) and ($_POST['edit'] == "rename") and !file_exists("images/{$_REQUEST['entry']}/album/{$_POST['filename']}")) {
diff --git a/index.php b/index.php
index 25f9fdd..0bee35b 100644
--- a/index.php
+++ b/index.php
@@ -3535,6 +3535,18 @@ foreach ($disp as $d) {
                        }
                        $entry_body = preg_replace("/\b($badwords)\b/i",$censor,$entry_body);
                }
+
+               if (file_exists("data/items/$d/shorten.txt")) {
+
+                       $entry_shorten = file_get_contents("data/items/$d/shorten.txt");
+
+                       $entry_lines = explode("\r",$entry_body);
+
+                       if (count($entry_lines) > $entry_shorten) {
+                               $entry_body = implode("",array_slice($entry_lines,0,$entry_shorten));
+                       }
+               }
+
                echo $entry_body;
        }
 
diff --git a/rel.txt b/rel.txt
index 105c62b..cab0f10 100644
--- a/rel.txt
+++ b/rel.txt
@@ -1 +1 @@
-20090129
\ No newline at end of file
+20090205
\ No newline at end of file
 
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
33164 downloads
MAJ 1.0
26 files
13196 downloads
MAJ 0.14
45 files
35116 downloads