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

commit 7a4dead464fb20ecebee07e80fcb21431af3dd08
tree 660433fc6ef859dbc93c60bc77c87ad86e229855
parent 7c6900f07fda98936889b0e7b7e3bf6a16478aab
author Engels Antonio <engels@majcms.org> 1277314216 +0800
committer Engels Antonio <engels@majcms.org> 1277314216 +0800

    maj-2.0-201006180340.zip

diff --git a/add.php b/add.php
index 88a156c..60f4698 100644
--- a/add.php
+++ b/add.php
@@ -1037,21 +1037,16 @@ if (isset($_POST['passwd']) and !empty($_POST['passwd'])) {
        }
 }
 
-$default_ping_url = "http://technorati.com/ping/http://" . $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']);
+if (file_exists("data/ping.txt")) {
 
-if (!file_exists("data/ping.txt")) {
-       $fp_default_ping_txt = fopen("data/ping.txt","w");
-       fwrite($fp_default_ping_txt, $default_ping_url);
-       fclose($fp_default_ping_txt);
-}
-
-$ping_urls = file_get_contents("data/ping.txt");
+       $ping_urls = file_get_contents("data/ping.txt");
 
-$get_ping_urls = explode("|", $ping_urls);
+       $get_ping_urls = explode("|", $ping_urls);
 
-foreach ($get_ping_urls as $ping_url) {
-       $ping = file_get_contents($ping_url);
-       unset($ping);
+       foreach ($get_ping_urls as $ping_url) {
+               $ping = file_get_contents($ping_url);
+               unset($ping);
+       }
 }
 
 ?>
diff --git a/edit.php b/edit.php
index 8e3ea52..d3c95a1 100644
--- a/edit.php
+++ b/edit.php
@@ -1502,19 +1502,14 @@ if (file_exists("data/items/{$_REQUEST['entry']}/body.old")) {
        unlink("data/items/{$_REQUEST['entry']}/body.old");
 }
 
-$default_ping_url = "http://technorati.com/ping/http://" . $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']);
+if (file_exists("data/ping.txt")) {
 
-if (!file_exists("data/ping.txt")) {
-       $fp_default_ping_txt = fopen("data/ping.txt","w");
-       fwrite($fp_default_ping_txt, $default_ping_url);
-       fclose($fp_default_ping_txt);
-}
-
-$ping_urls = explode("|", file_get_contents("data/ping.txt"));
+       $ping_urls = explode("|", file_get_contents("data/ping.txt"));
 
-foreach ($ping_urls as $ping_url) {
-       $ping = file_get_contents($ping_url);
-       unset($ping);
+       foreach ($ping_urls as $ping_url) {
+               $ping = file_get_contents($ping_url);
+               unset($ping);
+       }
 }
 
 ?>
diff --git a/index.php b/index.php
index a6e3300..654ca5c 100644
--- a/index.php
+++ b/index.php
@@ -4017,6 +4017,22 @@ foreach ($maj_disp as $maj_d) {
                }
                else {
 
+                       if ($maj_dh_count = opendir("data/items/$maj_d/filedrop/count")) {
+
+                               while (($maj_dl_count = readdir($maj_dh_count)) !== false) {
+
+                                       if ($maj_dl_count != "." && $maj_dl_count != "..") {
+
+                                               $maj_dl_match = substr("$maj_dl_count",0,-4);
+
+                                               if (file_exists("data/items/$maj_d/filedrop/count/$maj_dl_count") and !file_exists("data/items/$maj_d/filedrop/files/$maj_dl_match")) {
+                                                       unlink("data/items/$maj_d/filedrop/count/$maj_dl_count");
+                                               }
+                                       }
+                               }
+                               closedir($maj_dh_count);
+                       }
+
                        if ($maj_dh_filedrop = opendir("data/items/$maj_d/filedrop/files")) {
                                while (($maj_dl_file = readdir($maj_dh_filedrop)) !== false) {
                                        if ($maj_dl_file != "." && $maj_dl_file != "..") {
diff --git a/rel.txt b/rel.txt
index 3ea4ea2..5379875 100644
--- a/rel.txt
+++ b/rel.txt
@@ -1 +1 @@
-201006171846
+201006180340
 
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
32977 downloads
MAJ 1.0
26 files
13132 downloads
MAJ 0.14
45 files
35010 downloads